Skip to content

Commit 52ae112

Browse files
committed
Don't error on already closed milestones
When something goes wrong during the release, retrying the workflow should not fail due to the milestone being already closed.
1 parent b542d53 commit 52ae112

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ jobs:
119119
with:
120120
result-encoding: string
121121
script: |
122-
const openMilestones = await github.rest.issues.listMilestones({
122+
const milestones = await github.rest.issues.listMilestones({
123123
owner: context.repo.owner,
124124
repo: context.repo.repo,
125-
state: 'open'
125+
state: 'all'
126126
});
127-
const [milestone] = openMilestones.data.filter(x => x.title === "${{ github.event.inputs.releaseVersion }}")
127+
const [milestone] = milestones.data.filter(x => x.title === "${{ github.event.inputs.releaseVersion }}")
128128
if (!milestone) {
129129
throw new Error('Milestone "${{ github.event.inputs.releaseVersion }}" not found');
130130
}

0 commit comments

Comments
 (0)