Skip to content

Commit

Permalink
allow pull request query to match on .merge_commit_sha, not just .hea…
Browse files Browse the repository at this point in the history
…d.sha

Change-Id: Ib31152075a04e7fecf21426beedc8e36d552b45e
Signed-off-by: Nick Boldt <[email protected]>
  • Loading branch information
nickboldt committed Nov 18, 2022
1 parent 09bbad8 commit fe653f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion product/util2.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ ownerRepo="''' + ownerRepo + '''"
SHA="''' + SHA + '''"
# use gh to query a given repo for closed pulls for a given commitSHA; return the PR URL
curl -sSL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" \\
"https://api.github.com/repos/${ownerRepo}/pulls?state=closed" | yq -r --arg SHA "$SHA" '.[]|select(.head.sha == $SHA)|.comments_url'
"https://api.github.com/repos/${ownerRepo}/pulls?state=closed" | yq -r --arg SHA "$SHA" '.[]|select(.merge_commit_sha == $SHA or .head.sha == $SHA)|.comments_url'
''', returnStdout: true).trim()
return commentOnPullRequest(comments_url, message)
}
Expand Down

0 comments on commit fe653f6

Please sign in to comment.