Skip to content

Commit

Permalink
project: Continue run when can't load PR update
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 committed Nov 11, 2024
1 parent 53413e9 commit 9ef7234
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,13 @@ def github_handling(commit)
def check_run_termination
return if @github.nil?

pr = @github.find_pr

begin
pr = @github.find_pr
rescue GithubPullRequestLoadError => e
@logger.warn("Error while checking PR status: #{e}")
@logger.warn('Continuing CI run, PR status will be checked later')
return
end
# PR is nil when it was force-pushed
# PR is closed when it was closed or merged
@run_terminated = pr.nil? || @github.pr_closed?(pr)
Expand Down

0 comments on commit 9ef7234

Please sign in to comment.