Skip to content

Learning Pathway: Advanced Designer #3236

Learning Pathway: Advanced Designer

Learning Pathway: Advanced Designer #3236

# BASED ON https://github.com/WordPress/Documentation-Issue-Tracker/blob/main/.github/workflows/actions-when-commented.yml
name: Label feedback-type issues 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.body, '//content')
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["[Content] Feedback"]
})
- uses: actions/[email protected]
if: contains(github.event.issue.labels.*.name, 'Awaiting Triage') && contains(github.event.issue.body, '//dev')
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["[Type] Bug"]
})
- uses: actions/[email protected]
if: contains(github.event.issue.labels.*.name, 'Awaiting Triage') && contains(github.event.issue.body, '//handbook')
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["[Admin] Handbook"]
})