Skip to content

Commit a5b7e36

Browse files
committed
ING-1215: Add gha to validate jira tickets in commit messages
1 parent 40c35c4 commit a5b7e36

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: jira-validator
2+
on: [ pull_request ]
3+
4+
jobs:
5+
Jira_Commit_Checker:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: 0
12+
ref: '${{ github.event.pull_request.base.ref }}'
13+
14+
- name: Prep
15+
run: |
16+
# Checkout branch
17+
git checkout -q ${{ github.event.pull_request.head.ref }}
18+
19+
# Set variables
20+
BASE_BRANCH=${{ github.event.pull_request.base.ref }}
21+
22+
# Write BASE_BRANCH to GITHUB_ENV so commit checker can use
23+
echo "BASE_BRANCH=$BASE_BRANCH" | tee -a $GITHUB_ENV
24+
25+
- name: Jira Commit Checker
26+
id: jira_commit_checker
27+
uses: couchbaselabs/ActionJiraCommitValidate@master
28+
with:
29+
jira-username: ${{ vars.JIRA_USER }}
30+
jira-api-token: ${{ secrets.JIRA_TOKEN }}
31+
JIRA_URL: 'api.atlassian.com/ex/jira/7fa05bac-b453-4b39-9ec3-830a6365e08a'
32+
BASE_BRANCH: ${{ env.BASE_BRANCH }}

0 commit comments

Comments
 (0)