We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e52fe2 commit 009b5f2Copy full SHA for 009b5f2
.github/actions/comment_patch_url.rb
@@ -47,7 +47,7 @@ def patch_artifact_download_url
47
end
48
49
def pull_request_number
50
- WORKFLOW_RUN['pull_requests'][0]['number']
+ WORKFLOW_RUN.dig('pull_requests', 0, 'number')
51
52
53
def post_pr_comment(pr_number, comment)
@@ -70,7 +70,7 @@ def main
70
existing_comment_id = find_previous_comment_id(pull_request_number)
71
delete_comment(existing_comment_id) if existing_comment_id
72
73
- post_pr_comment pull_request_number, "Patch can be downloaded [here](#{patch_artifact_download_url})"
+ post_pr_comment pull_request_number, "Patch can be downloaded [here](#{patch_artifact_download_url})" if pull_request_number
74
75
76
main if __FILE__ == $0
0 commit comments