Skip to content

Commit

Permalink
fix: sort the list of merges by reverse timestamp to ensure the most …
Browse files Browse the repository at this point in the history
…rescent merge is pulled
  • Loading branch information
cberg-aot committed Nov 19, 2024
1 parent 6d66d4f commit e91de73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ runs:
pr=$(\
curl -sL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ inputs.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/search/issues\?q\=repo:${{ github.repository }}+is:pr+is:merged \
| jq .items[0].number
https://api.github.com/search/issues\?q\=repo:bcgov/onroutebc+is:pr+is:merged \
| jq '.items | sort_by(.pull_request.merged_at) | reverse'[0].number
)
if [ -z "${pr}" ]
Expand Down

0 comments on commit e91de73

Please sign in to comment.