-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Part of GitHub updates. Testing new script.
- Loading branch information
Showing
1 changed file
with
36 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,36 @@ | ||
### https://github.com/WordPress/Documentation-Issue-Tracker/blob/main/.github/workflows/actions-when-commented.yml | ||
|
||
name: Label and move feedback to correct project when commented with command | ||
on: | ||
issue_comment: | ||
types: [created, 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.comment.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"] | ||
}) |