Skip to content

Commit

Permalink
chore: update issue labels on external comment
Browse files Browse the repository at this point in the history
  • Loading branch information
atierian committed Oct 16, 2023
1 parent ec5a64d commit 80f22f4
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/remove_pending_response_on_comment.yml
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"

0 comments on commit 80f22f4

Please sign in to comment.