This repository provides a GitHub action to automatically team label on a pull request based author team. This is useful if multiple team are working on the same project.
You need to provide a yml file that contains members of your teams:
LightSide:
- '@Yoda'
- '@Luke'
DarkSide:
- '@DarkVador'
- '@Palpatine'
Create a workflow (eg: .github/workflows/team-labeler.yml
see Creating a Workflow file) to utilize the labeler action.
This action only needs the GITHUB_TOKEN secret as it interacts with the GitHub API to modify labels. It's working for pull request and issues. The action can be used as such:
on:
pull_request:
issues:
name: team-label
permissions:
contents: read
pull-requests: write
jobs:
team-labeler:
runs-on: ubuntu-latest
steps:
- uses: JulienKode/team-labeler-action@v1.1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"