12345678910111213141516171819202122 |
- name: Label issue from external users
- on:
- issues:
- types: [opened]
- jobs:
- label-external-issues:
- name: Label issue from external user
- runs-on: ubuntu-latest
- # https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
- if: ${{ !contains(fromJson('["MEMBER", "OWNER", "COLLABORATOR"]'), github.event.issue.author_association) }}
- steps:
- - name: add external label
- uses: actions/github-script@v7
- with:
- script: |
- github.rest.issues.addLabels({
- issue_number: context.issue.number,
- owner: context.repo.owner,
- repo: context.repo.repo,
- labels: ['external']
- })
|