-
Notifications
You must be signed in to change notification settings - Fork 38
32 lines (28 loc) · 977 Bytes
/
close-issues.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Close Issues
on:
issues:
types: [closed]
env:
GH_TOKEN: ${{ secrets.TOKEN }}
jobs:
remove-label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Remove `ready-to-test` Label
run: |
# get closed issue with label "ready-to-test"
issues="$(gh issue list -s closed -l "#status: ready-to-test :heavy_check_mark:" --json id --jq '.[] | .id')"
# process issues
for issueId in $issues; do
gh api graphql -F issueId=$issueId -f query='
mutation UpdateIssue_RemoveLabel($issueId: ID!) {
removeLabelsFromLabelable(input: {
labelIds: [ "LA_kwDODbcoCM8AAAABfBUdOw", "LA_kwDODbcoCM8AAAABfA96zA" ],
labelableId: $issueId
}) {
clientMutationId,
labelable { labels (first: 100) { nodes { name }} }
}
}'
done