Skip to content

Commit

Permalink
skip closing already closed milestone (#5869)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Jun 26, 2024
1 parent 21e29e5 commit 05e6f59
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,17 @@ jobs:
/repos/${{ github.repository }}/milestones \
| jq --arg version ${{ inputs.nic_version }} -r \
'.[] | select(.title == $version) | .number')
if ! ${{ inputs.dry_run }}
gh api --method PATCH -H "Accept: application/vnd.github.v3+json" \
/repos/${{ github.repository }}/milestones/${milestone_number} \
if [ -n "${milestone_number}" ]; then
if ! ${{ inputs.dry_run }}; then
gh api --method PATCH -H "Accept: application/vnd.github.v3+json" \
/repos/${{ github.repository }}/milestones/${milestone_number} \
-f "title=v${{ inputs.nic_version }}" \
-f "state=closed";
else
echo "Skipping closing Github Release milestone, DRY_RUN"
fi
else
echo "Skipping closing Github Release milestone, DRY_RUN"
echo "Github Milestone not available, closed already."
fi
- name: Get Github release id
Expand Down

0 comments on commit 05e6f59

Please sign in to comment.