Skip to content

Commit

Permalink
Create assign-feedback-to-project.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitohm authored Nov 25, 2023
1 parent 578d56c commit 43866d0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/assign-feedback-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# BASED ON https://github.com/WordPress/Documentation-Issue-Tracker/blob/main/.github/workflows/actions-when-commented.yml

name: Label and move feedback to correct project when opened
on:
issues:
types: [opened, edited]

jobs:

label_issues:
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/[email protected]
with:
script: console.log(context)
- uses: actions/[email protected]
if: contains(github.event.issue.labels.*.name, 'Awaiting Triage') && contains(github.event.issue.labels.*.name, '[Type] Bug') && contains(github.event.issue.body, '/content')
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ["[Type] Bug"]
})
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["Content Feedback"]
})

0 comments on commit 43866d0

Please sign in to comment.