mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Do not fail github_pr_errors if PR is closed or merged
This commit is contained in:
@@ -485,12 +485,14 @@ class Formatter
|
||||
def display_pull_request_info(workflow_run)
|
||||
return unless workflow_run['event'] == 'pull_request'
|
||||
|
||||
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}"
|
||||
warn " Pull Request: #{pr_display_title} "
|
||||
if pr = workflow_run['pull_requests'].first
|
||||
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}"
|
||||
warn " Pull Request: #{pr_display_title} "
|
||||
else
|
||||
warn " Pull Request: not found; perhaps it is already merged or closed?"
|
||||
end
|
||||
end
|
||||
|
||||
def commit_message(workflow_run)
|
||||
|
||||
Reference in New Issue
Block a user