Skip to content

Commit

Permalink
Merge pull request #68 from contentauth/davestein/label-ticket-updates
Browse files Browse the repository at this point in the history
chore: Updating ticket status based on labels
  • Loading branch information
gpeacock authored Dec 3, 2024
2 parents 71eafe7 + 3fa1b81 commit 7728124
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/closing_ticket.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Closing ticket
on:
issues:
types: [closed]
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- 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"'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
17 changes: 17 additions & 0 deletions .github/workflows/labeling_ticket_done.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Labeling ticket "Done"
on:
issues:
types: [labeled]
jobs:
label_issues:
runs-on: ubuntu-latest
if: |
contains(github.event.issue.labels.*.name, 'status: done')
permissions:
issues: write
steps:
- run: 'gh issue close "$NUMBER"'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
17 changes: 17 additions & 0 deletions .github/workflows/labeling_ticket_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Labeling ticket "To Do"
on:
issues:
types: [labeled]
jobs:
label_issues:
runs-on: ubuntu-latest
if: |
!contains(github.event.issue.labels.*.name, 'status: done')
permissions:
issues: write
steps:
- run: 'gh issue reopen "$NUMBER"'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
15 changes: 15 additions & 0 deletions .github/workflows/reopening_ticket.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Reopening ticket
on:
issues:
types: [reopened]
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- 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"'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}

0 comments on commit 7728124

Please sign in to comment.