Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github: add labels to PRs #1877

Merged
merged 3 commits into from
Mar 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/issue-label-automation.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: issue-automation
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-issues-labels:
automate-labels:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Check for External Contributor
uses: tspascoal/get-user-teams-membership@v2
Expand All @@ -16,13 +20,17 @@ jobs:
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
Expand Down