-
Notifications
You must be signed in to change notification settings - Fork 276
94 lines (87 loc) · 3.2 KB
/
iroha2-dev-pr-title.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: I2::Dev::Title
on:
pull_request:
branches: [iroha2-dev]
types: [opened, edited, reopened]
jobs:
check:
runs-on: ubuntu-latest
# TODO: Add labels when https://github.com/actions/first-interaction/issues/10 is fixed.
steps:
- name: Feature
uses: actions-ecosystem/action-regex-match@v2
id: feature-match
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[feature\] #\d+(, #\d+)*: .+$'
# - name: Add feature label
# uses: actions-ecosystem/action-add-labels@v1
# if: steps.feature-match.outputs.match != ''
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Enhancement
- name: Refactor
uses: actions-ecosystem/action-regex-match@v2
id: refactor-match
if: steps.feature-match.outputs.match == ''
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[refactor\]( #\d+(, #\d+)*)?: .+$'
# - name: Add Refactor label
# uses: actions-ecosystem/action-add-labels@v1
# if: steps.refactor-match.outputs.match != ''
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Refactor
- name: Fix
uses: actions-ecosystem/action-regex-match@v2
id: fix-match
if: steps.refactor-match.outputs.match == ''
with:
text: ${{ github.event.pull_request.title }}
regex: '\[fix\] #\d+(, #\d+)*: .+$'
# - name: Add fix label
# uses: actions-ecosystem/action-add-labels@v1
# if: steps.fix-match.outputs.match != ''
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Bug
- name: Documentation
uses: actions-ecosystem/action-regex-match@v2
id: docs-match
if: steps.feature-match.outputs.match == ''
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[documentation\]( #\d+(, #\d+)*)?: .+$'
# - name: Add Documentation label
# uses: actions-ecosystem/action-add-labels@v1
# if: steps.docs-match.outputs.match != ''
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# Documentation
- name: CI
uses: actions-ecosystem/action-regex-match@v2
id: ci-match
if: steps.feature-match.outputs.match == ''
with:
text: ${{ github.event.pull_request.title }}
regex: '^\[ci\]( #\d+(, #\d+)*)?: .+$'
# - name: Add CI label
# uses: actions-ecosystem/action-add-labels@v1
# if: steps.ci-match.outputs.match != ''
# continue-on-error: true
# with:
# github_token: ${{ secrets.github_token }}
# labels: |
# CI
- name: None of the above
if: steps.fix-match.outputs.match == '' && steps.refactor-match.outputs.match == '' && steps.feature-match.outputs.match == '' && steps.docs-match.outputs.match == '' && steps.ci-match.outputs.match == ''
run: exit 1