This repository was archived by the owner on Apr 28, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,13 +68,29 @@ runs:
6868 env :
6969 GH_TOKEN : ${{ inputs.gh_token }}
7070 run : |
71- prs=$(gh api \
72- -H "Accept: application/vnd.github+json" \
73- -H "X-GitHub-Api-Version: 2022-11-28" \
74- /repos/${{ github.repository }}/commits/${{ github.sha }}/pulls)
71+ data=$(gh api graphql \
72+ -F owner='${{ github.repository_owner }}' \
73+ -F name='${{ github.event.repository.name }}' \
74+ -F ref='${{ github.sha }}' \
75+ -F query='query($name: String!, $owner: String!, $ref: GitObjectID!) {
76+ repository(owner: $owner, name: $name) {
77+ object(oid: $ref) {
78+ ...on Commit {
79+ associatedPullRequests(first: 10) {
80+ nodes {
81+ number
82+ }
83+ }
84+ }
85+ }
86+ }
87+ }')
88+
89+ prs=$(echo $data | jq -r '.data.repository.object.associatedPullRequests.nodes[].number')
7590
7691 echo "prs=$prs" >> $GITHUB_OUTPUT
7792 echo "prs $prs"
93+ echo "data $data"
7894
7995 - name : Get ther run URL
8096 id : run
96112 [View the run](${{ steps.run.outputs.url }})
97113 EOF
98114
99- for pr in $(echo '${{ steps.prs.outputs.prs }}' | jq -r '.[].number' ); do
115+ for pr in $(echo '${{ steps.prs.outputs.prs }}'); do
100116 gh api \
101117 --method POST \
102118 -H "Accept: application/vnd.github.v3+json" \
Original file line number Diff line number Diff line change 3333 fly_token : ${{ secrets.FLY_TOKEN }}
3434 slack_webhook_url : ${{ secrets.SLACK_WEBHOOK_URL }}
3535 gh_token : ${{ secrets.GITHUB_TOKEN }}
36-
37- - uses : ./.github/actions/link
You can’t perform that action at this time.
0 commit comments