Skip to content

Commit

Permalink
Update issue label workflow (#8290)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Jan 27, 2023
1 parent 9524831 commit 3fac486
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/issue-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Issue bot

on:
issues:
types: [closed, assigned, unassigned, labeled]

jobs:
remove_label:
runs-on: ubuntu-latest
steps:
- name: Remove triage label on close
if: github.event.action == 'closed'
run: gh issue edit --repo prefecthq/prefect ${{ github.event.issue.number }} --remove-label "status:triage"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update issue status when assigned
if: github.event.action == 'assigned'
run: gh issue edit --repo prefecthq/prefect ${{ github.event.issue.number }} --add-label "status:in-progress"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update issue status when unassigned
if: github.event.action == 'unassigned'
run: gh issue edit --repo prefecthq/prefect ${{ github.event.issue.number }} --remove-label "status:in-progress"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Remove triage label on status change
if: github.event.action == 'labeled' && startsWith(github.event.label.name, "status:") && github.event.label.name != "status:triage"
run: gh issue edit --repo prefecthq/prefect ${{ github.event.issue.number }} --remove-label "status:triage"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 0 additions & 14 deletions .github/workflows/remove-issue-labels.yaml

This file was deleted.

0 comments on commit 3fac486

Please sign in to comment.