-
Notifications
You must be signed in to change notification settings - Fork 9
42 lines (39 loc) · 1.78 KB
/
governance.branch.labels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: pull-request-branch-labels
# todo: should only run if branch not named as it should
on:
pull_request:
types: [opened, ready_for_review]
jobs:
pr-labeler:
name: pull request labels
runs-on: ubuntu-latest
if: >
github.repository != 'ivankatliarchuk/.github' &&
(github.event.pull_request.user.login != 'dependabot[bot]' || github.event.pull_request.user.login != 'dependabot-preview[bot]' ||
github.event.pull_request.user.login != 'renovate[bot]' || github.event.pull_request.user.login != 'renovate-bot')
steps:
- name: identify actor & creator
run: |
echo "actor: ${{ github.actor }}"
echo "creator: ${{ github.event.pull_request.user.login }}"
- name: validate branch name
uses: AlbertHernandez/branch-name-action@v1.0.2
with:
branch_pattern: 'feature|feat|fix|bug|chore|hotfix|docs|dependencies|deps|renovate'
comment_for_invalid_branch_name: |
**Pro Tip!**
You can help us label your Pull Requests by using the following branch naming convention next time you create a pull request.
Branch naming convention | Label
------------------------ | ------
`feat/**|feature/**` | kind/feature
`fix/**` | kind/fix
`chore/**` | kind/chore
`stable/**` | kind/stable
`docs/**` | kind/docs
`dependencies/**` | kind/dependencies
`renovate/**` | kind/dependencies
<hr>
If your changes do not fall into any of these categories, don't worry.
You can just ignore this message in that case! 👀
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}