-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (40 loc) · 2.03 KB
/
auto-labeling.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: Labeling
on:
pull_request:
types: [ synchronize, opened, reopened, labeled, unlabeled ]
jobs:
labeling:
name: Adding Labels
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
REPO: ${{ github.repository_owner }}/${{ github.event.repository.name }}
steps:
- name: Bug
if: ${{ contains(github.event.pull_request.title, 'Bug') || contains(github.event.pull_request.title, 'Fix') }}
run: gh pr edit $PR_NUMBER --add-label 'bug :bug:' -R $REPO
- name: CI/CD
if: ${{ contains(github.event.pull_request.title, 'CI/CD') }}
run: gh pr edit $PR_NUMBER --add-label 'CI/CD :cd:' -R $REPO
- name: Dependencies
if: ${{ contains(github.event.pull_request.title, 'Dependency') || contains(github.event.pull_request.title, 'Dependencies') }}
run: gh pr edit $PR_NUMBER --add-label 'dependencies' -R $REPO
- name: Documentation
if: ${{ contains(github.event.pull_request.title, 'Documentation') }}
run: gh pr edit $PR_NUMBER --add-label 'documentation :book:' -R $REPO
- name: Enhancement
if: ${{ contains(github.event.pull_request.title, 'Enhancement') }}
run: gh pr edit $PR_NUMBER --add-label 'enhancement :sparkles:' -R $REPO
- name: Feature
if: ${{ contains(github.event.pull_request.title, 'Feature') }}
run: gh pr edit $PR_NUMBER --add-label 'feature :moneybag:' -R $REPO
- name: Housekeeping
if: ${{ contains(github.event.pull_request.title, 'Housekeeping') || contains(github.event.pull_request.title, 'Refactoring') }}
run: gh pr edit $PR_NUMBER --add-label 'housekeeping :broom:' -R $REPO
- name: Release
if: ${{ contains(github.event.pull_request.title, 'Release') }}
run: gh pr edit $PR_NUMBER --add-label 'release :tada:' -R $REPO
- name: Testing
if: ${{ contains(github.event.pull_request.title, 'Testing') }}
run: gh pr edit $PR_NUMBER --add-label 'testing :test_tube:' -R $REPO