Skip to content

Commit dc05ce7

Browse files
Merge pull request #7 from fullstackzach/another-test-branch
missing jira
2 parents 18865e4 + 3e1c603 commit dc05ce7

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/scripts/commit-checker.sh renamed to .github/scripts/commit-linting.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ BRANCH_MERGE_BASE=$(git merge-base ${BASE_BRANCH} ${CURRENT_BRANCH})
2020
# Find all commits since common ancestor
2121
BRANCH_COMMITS=$(git rev-list ${BRANCH_MERGE_BASE}..HEAD)
2222

23-
#echo $BRANCH_COMMITS
24-
2523
# Check every commit message since ancestor for regex match
2624
for commit in $BRANCH_COMMITS; do
2725
COMMIT_MSG_UPPER=$(git log --max-count=1 --format=%B $commit | tr '[a-z]' '[A-Z]')
@@ -50,7 +48,7 @@ done
5048
# If any commit are invalid, print the reject message
5149
if [ "$invalidCommit" == true ]; then
5250
echo "Commit messages must include a JIRA ticket number e.g. \"AAA-1234\". This can be anywhere in your commit"
53-
echo "You can skip this step if necessary by running \"git commit --amend\" and add \"[skip jira]\" in your commit message"
51+
echo "You can skip this whole step if necessary by running \"git commit --amend\" and add \"[skip jira]\" in your commit message"
5452
echo "Please fix the commit message(s) and push again."
5553
echo "https://help.github.com/en/articles/changing-a-commit-message"
5654
echo "************"
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Commit Checker
1+
name: Commit messages contain a Jira issue
22

33
# Run on push to any branch
44
on: [pull_request]
55

66
jobs:
7-
commit-checker:
7+
commit-linting:
88
runs-on: ubuntu-latest
99

1010
steps:
@@ -13,6 +13,5 @@ jobs:
1313
fetch-depth: 0
1414
ref: '${{ github.event.pull_request.base.ref }}'
1515

16-
- name: Commit validation
17-
run: bash ${GITHUB_WORKSPACE}/.github/scripts/commit-checker.sh ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }}
18-
16+
- name: Commit messages contain a Jira issue
17+
run: bash ${GITHUB_WORKSPACE}/.github/scripts/commit-checker.sh ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# gh-actions-playground
22

3-
test 2345
3+
test 234567s

0 commit comments

Comments
 (0)