mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Raise an error in the github pr errors script when the PR cannot be found on the workflow, this happens when a PR is closed or merged
This commit is contained in:
committed by
Oliver Günther
parent
eb0dae09a2
commit
4bf9f53802
@@ -206,7 +206,8 @@ end
|
||||
def display_pull_request_info(workflow_run)
|
||||
return unless workflow_run['event'] == 'pull_request'
|
||||
|
||||
pr = workflow_run['pull_requests'].first
|
||||
pr = workflow_run['pull_requests'].first or
|
||||
raise "Pull Request info cannot be found, perhaps it is already merged or closed?"
|
||||
pr_number = "##{pr['number']}"
|
||||
pr_html_url = "#{GITHUB_HTML_OPENPROJECT_PREFIX}/pull/#{pr['number']}"
|
||||
pr_display_title = "#{workflow_run['display_title']} #{pr_number.white.dark} #{pr_html_url.white.dark}"
|
||||
|
||||
Reference in New Issue
Block a user