-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update issue labels on external comment
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Swaps `pending-response` for `follow up` label on comment from a non owner / member author association. | ||
|
||
name: Update labels on external comment | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
remove-pending-response label: | ||
name: | ||
runs-on: ubuntu-latest | ||
if: ${{ !github.event.issue.pull_request && (contains(github.event.issue.labels.*.name, 'pending-response')) }} | ||
|
||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b | ||
- name: remove pending-response label on external comment | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --remove-label "pending-response" | ||
add-follow-up-label: | ||
name: | ||
runs-on: ubuntu-latest | ||
if: ${{ !github.event.issue.pull_request && !(contains(github.event.issue.labels.*.name, 'follow up')) }} | ||
|
||
steps: | ||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b | ||
- name: add follow up label on external comment | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
run: | | ||
gh issue edit $ISSUE_NUMBER --add-label "follow up" |