Assign Pull Requests to your GitHub teams or individual users based on the paths of the modified files
☝️ Create a file named assign-by-path.yml
inside the .github/workflows
directory and paste:
name: assign-by-path
on: [push]
jobs:
assigner:
runs-on: ubuntu-latest
name: 👤 Assign by path
steps:
- uses: codelytv/assign-by-path@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mapping: |
rgomezcasas: ["src"]
javiercane: ["src", "dist"]
barackObama: ["node_modules"]
CodelyTV/staff: ["src"]
You can combine this action with others such as:
- Notify to the Slack channel
#mooc-team
when a PR has been assigned to themooc
GitHub team - Send an email to
[email protected]
when a PR has been assigned to themooc
GitHub team - You name it! Composition over Inheritance FTW! 😊