From c8e3c3d6440d466802fc2da8075ad519f714d56b Mon Sep 17 00:00:00 2001 From: Chris Berg Date: Wed, 25 Sep 2024 15:35:18 -0700 Subject: [PATCH 1/2] added api fix to get pr num --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 7fe9075..9db2677 100644 --- a/action.yml +++ b/action.yml @@ -53,7 +53,7 @@ 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/repos/${{ github.repository }}/commits/${{ github.event.after }}/pulls \ + https://api.github.com/search/issues\?q\=repo:bcgov/onroutebc+is:pr+is:merged \ | jq .[0].number ) From c649770cc297b28fdeb0452092a41958e58bf24d Mon Sep 17 00:00:00 2001 From: Chris Berg Date: Wed, 25 Sep 2024 15:38:34 -0700 Subject: [PATCH 2/2] fix: added proper repository --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9db2677..31242ad 100644 --- a/action.yml +++ b/action.yml @@ -53,7 +53,7 @@ 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:bcgov/onroutebc+is:pr+is:merged \ + https://api.github.com/search/issues\?q\=repo:${{ github.repository }}+is:pr+is:merged \ | jq .[0].number )