Skip to content

Commit 844df99

Browse files
committed
ING-1215: Add gha to validate jira tickets in commit messages
1 parent a191c32 commit 844df99

File tree

1 file changed

+35
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)