forked from celestiaorg/celestia-node
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.27 KB
/
issue-label-automation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Label Automation
on:
# Using pull_request_target for forks since labels are not a security issue
pull_request_target:
types: [opened]
issues:
types: [opened]
jobs:
automate-labels:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
permissions:
issues: write
pull-requests: write
steps:
- name: Check for External Contributor
uses: tspascoal/get-user-teams-membership@v3
id: teamCheck
with:
username: ${{ github.actor }}
team: "celestia-node"
GITHUB_TOKEN: ${{ secrets.PAT_TEAM_CHECK }}
# For issues we want to add a `needs:triage` label if it is unlabeled
- name: Triage labeling
if: ${{ github.event_name == 'issues' }}
uses: andymckay/labeler@master
with:
add-labels: "needs:triage"
ignore-if-labeled: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
# For both issues and PRs we want to add the `external` label if the
# author is not a member of the node team
- name: External labeling
if: ${{ steps.teamCheck.outputs.isTeamMember == 'false' }}
uses: andymckay/labeler@master
with:
add-labels: "external"
repo-token: ${{ secrets.GITHUB_TOKEN }}