[Meetup] bellinzona #380
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
name: Issue labeler | |
on: | |
issues: | |
types: [opened] | |
permissions: | |
contents: read | |
jobs: | |
label-component: | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.event.issue.labels.*.name, 'Awaiting Triage') && contains(github.event.issue.labels.*.name, 'event')}} | |
permissions: | |
# required for all workflows | |
issues: write | |
steps: | |
- uses: actions/checkout@v4.1.1 | |
- name: Parse issue form | |
uses: stefanbuck/github-issue-parser@v3.2.1 | |
id: issue-parser | |
with: | |
template-path: .github/ISSUE_TEMPLATE/0-event-application-vetting.yml | |
- name: Set labels based on Event Type field | |
uses: redhat-plumbers-in-action/advanced-issue-labeler@v3.2.0 | |
with: | |
issue-form: ${{ steps.issue-parser.outputs.jsonString }} | |
section: eventtype | |
config-path: .github/label-policy.yml | |
template: 0-event-application-vetting.yml | |
block-list: | | |
None | |
Other | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/github-script@v7.0.1 | |
if: ${{ contains(github.event.issue.labels.*.name, 'Awaiting Triage') && contains(github.event.issue.labels.*.name, 'event')}} | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: "Heads up @WordPress/community-triage, we have a new issue openned by @${{ github.event.issue.user.login }}. Time to triage." | |
}) |