Skip to content

Commit

Permalink
remove unnecessary if statements in the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yardasol committed Feb 3, 2022
1 parent c07bafd commit 7c23fd6
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/auto-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
issues:
types: [closed]
pull_request:
types: [closed, review_requested]
types: [closed]

jobs:
# job for issue events
Expand All @@ -18,17 +18,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Remove Priority and Status labels
if: github.event.issue.action == "closed"
run: |
id=${{ github.event.issue.number }}
gh issue edit $id --remove-label "Priority:*"
gh issue edit $id --remove-label "Status:*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Priority/Status labels on linked PRs



# job for pr events
auto-labels-pr:
Expand All @@ -41,19 +37,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Remove Priority and Status labels
if: github.event.pull_request.action == "closed"
run: |
id=${{ github.event.pull_reqeust.number }}
gh pr edit $id --remove-label "Priority:*"
gh pr edit $id --remove-label "Status:*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update linked issues
if: github.event.pull_request.action == "review_requested"
run: |
id=${{ github.event.pull_request.number }}
gh pr edit $id --remove-label "Status:*"
gh pr edit $id --add-label "Status:In Review"

0 comments on commit 7c23fd6

Please sign in to comment.