chore: update CI actions for project assigning and labeling #142
Workflow file for this run
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] | |
pull_request_target: | |
types: [opened] | |
# 'issues: write' for https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#add-labels-to-an-issue | |
permissions: | |
contents: read | |
issues: write | |
jobs: | |
triage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Add agent-nodejs label | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: agent-nodejs | |
- name: Check team membership for user | |
uses: elastic/[email protected] | |
id: checkUserMember | |
with: | |
username: ${{ github.actor }} | |
team: 'apm' | |
usernamesToExclude: | | |
apmmachine | |
dependabot | |
dependabot[bot] | |
GITHUB_TOKEN: ${{ secrets.APM_TECH_USER_TOKEN }} | |
- name: Add community and triage labels | |
if: steps.checkUserMember.outputs.isTeamMember != 'true' && steps.checkUserMember.outputs.isExcluded != 'true' | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: | | |
community | |
triage |