Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update issue labels on external comment #3298

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading