Skip to content

Commit 4715d87

Browse files
committed
chore: Only use the GitHub API for data retrieval
`gh pr` requires a checkout step, which is not necessary.
1 parent 7215e94 commit 4715d87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/milestone-automation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Check if PR was in Backlog
1717
id: check_milestone
1818
run: |
19-
milestone_id=$(gh pr view ${{ github.repository }}#${{ github.event.pull_request.number }} --json milestone --jq '.milestone.number')
19+
milestone_id=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} --jq '.milestone.number')
2020
if [[ "$milestone_id" == "3" ]]; then
2121
echo "backlog_milestone=true" >> $GITHUB_OUTPUT
2222
else
@@ -36,7 +36,7 @@ jobs:
3636
- name: Find and update associated issues to "shipping next"
3737
if: steps.check_milestone.outputs.backlog_milestone == 'true'
3838
run: |
39-
issues=$(gh pr view ${{ github.repository }}#${{ github.event.pull_request.number }} --json closingIssuesReferences --jq '.closingIssuesReferences[].number')
39+
issues=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} --jq '.closingIssuesReferences[].number')
4040
for issue in $issues; do
4141
echo "Updating issue #$issue to milestone ID 2 (shipping next)"
4242

0 commit comments

Comments
 (0)