diff --git a/.github/scripts/commit-linting-loose.sh b/.github/scripts/commit-linting-loose.sh index 7ed5d0b..a596928 100644 --- a/.github/scripts/commit-linting-loose.sh +++ b/.github/scripts/commit-linting-loose.sh @@ -58,7 +58,7 @@ fi # If we made it this far, no JIRA ticket # was detected in a commit or branch, print the reject message and fail the job -echo "⛔️ At least one commit message OR your branch name must include a JIRA ticket number e.g. \"AUS-1234\". This can be anywhere in your commit" +echo "⛔️ At least one commit OR your branch name must include a JIRA ticket number e.g. \"AUS-1234\". This can be anywhere in your commit" echo "You can skip this whole step if necessary by running \"git commit --amend\" and add \"[skip jira]\" in your last commit message, and force-push" echo "Please fix the commit message and push again." echo "https://help.github.com/en/articles/changing-a-commit-message" diff --git a/.github/workflows/commit-linting.yml b/.github/workflows/commit-linting.yml index c13f7a0..30b407d 100644 --- a/.github/workflows/commit-linting.yml +++ b/.github/workflows/commit-linting.yml @@ -14,4 +14,6 @@ jobs: ref: '${{ github.event.pull_request.base.ref }}' - name: Branch or Commits includes a Jira issue - run: bash ${GITHUB_WORKSPACE}/.github/scripts/commit-linting-loose.sh ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} \ No newline at end of file + run: | + git checkout ${{ github.event.pull_request.head.ref }} + bash ${GITHUB_WORKSPACE}/.github/scripts/commit-linting-loose.sh ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} \ No newline at end of file