blob: 582c4e2c582c953b3ac476309c7e1bfe18f0997c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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']
})
|