chore: Contribution labeller #959
Workflow file for this run
This file contains hidden or 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: Opened Pull Request Labeler | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
pr-context-labeller: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Assign Author | |
uses: technote-space/assign-author@v1 | |
- name: Check user for team affiliation | |
uses: tspascoal/get-user-teams-membership@v2 | |
id: teamAffiliation | |
with: | |
GITHUB_TOKEN: "${{ secrets.PAT_GH_READ_ORG }}" | |
username: "${{ github.actor }}" | |
team: "Design Systems PD" | |
# ,design-systems,Design Systems Eng,Design Systems Eng Leads | |
- name: Debug in group | |
run: echo "${{ github.actor }} is team member ${{ steps.teamAffiliation.outputs.isTeamMember }}" | |
- name: Check user for team affiliation | |
uses: tspascoal/get-user-teams-membership@v2 | |
id: teamAffiliationList | |
with: | |
GITHUB_TOKEN: "${{ secrets.PAT_GH_READ_ORG }}" | |
username: "${{ github.actor }}" | |
- name: Debug groups | |
run: echo "${{ steps.teamAffiliationList.outputs.teams }}" | |
- name: Auto contribution labeller | |
if: ${{ steps.teamAffiliation.outputs.isTeamMember == 'false' }} | |
uses: actions/labeler@v4 | |
with: | |
repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
configuration-path: .github/opened-pr-contribution-labeler.yml |