Skip to content

Commit 48d633f

Browse files
committed
chore: Updating ticket status based on labels
1 parent 7ee651d commit 48d633f

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Closing ticket
2+
on:
3+
issues:
4+
types: [closed]
5+
jobs:
6+
label_issues:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
steps:
11+
- run: 'gh issue edit "$NUMBER" --add-label "status: done" --remove-label "status: wip,status: todo,status: in progress,status: in test,status: not prioritized,status: blocked,status: api review,status: code review,status: design review,status: code complete,status: ready"'
12+
env:
13+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GH_REPO: ${{ github.repository }}
15+
NUMBER: ${{ github.event.issue.number }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Labeling ticket "Done"
2+
on:
3+
issues:
4+
types: [labeled]
5+
jobs:
6+
label_issues:
7+
runs-on: ubuntu-latest
8+
if: |
9+
contains(github.event.issue.labels.*.name, 'status: done')
10+
permissions:
11+
issues: write
12+
steps:
13+
- run: 'gh issue close "$NUMBER"'
14+
env:
15+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
GH_REPO: ${{ github.repository }}
17+
NUMBER: ${{ github.event.issue.number }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Labeling ticket "To Do"
2+
on:
3+
issues:
4+
types: [labeled]
5+
jobs:
6+
label_issues:
7+
runs-on: ubuntu-latest
8+
if: |
9+
!contains(github.event.issue.labels.*.name, 'status: done')
10+
permissions:
11+
issues: write
12+
steps:
13+
- run: 'gh issue reopen "$NUMBER"'
14+
env:
15+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
GH_REPO: ${{ github.repository }}
17+
NUMBER: ${{ github.event.issue.number }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Reopening ticket
2+
on:
3+
issues:
4+
types: [reopened]
5+
jobs:
6+
label_issues:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
steps:
11+
- run: 'gh issue edit "$NUMBER" --add-label "status: todo" --remove-label "status: wip,status: done,status: in progress,status: in test,status: not prioritized,status: blocked,status: api review,status: code review,status: design review,status: code complete,status: ready"'
12+
env:
13+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GH_REPO: ${{ github.repository }}
15+
NUMBER: ${{ github.event.issue.number }}

0 commit comments

Comments
 (0)