File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : jira-link
2
+
3
+ on :
4
+ pull_request :
5
+ types : [opened, edited, reopened, synchronize]
6
+
7
+ jobs :
8
+ jira-link :
9
+ runs-on : ubuntu-20.04
10
+ steps :
11
+ - name : check pull request title and source branch name
12
+ run : |
13
+ echo "Checking pull request with title ${{ github.event.pull_request.title }} from source branch ${{ github.event.pull_request.head.ref }}"
14
+ if ! [[ "${{ github.event.pull_request.title }}" =~ ^AIRO-[0-9]+[[:space:]].*$ ]] && ! [[ "${{ github.event.pull_request.head.ref }}" =~ ^AIRO-[0-9]+.*$ ]]
15
+ then
16
+ echo -e "Please make sure one of the following is true:\n \
17
+ 1. the pull request title starts with 'AIRO-xxxx ', e.g. 'AIRO-1024 My Pull Request'\n \
18
+ 2. the source branch starts with 'AIRO-xxx', e.g. 'AIRO-1024-my-branch'"
19
+ exit 1
20
+ else
21
+ echo "Completed checking"
22
+ fi
You can’t perform that action at this time.
0 commit comments