You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
commit message checker passes when it should fail after pattern is removed from PR commit #49
Workflow passes despite pattern not being present in the PRs commits.
repro steps:
create multiple commits, have the matching pattern in one of these commits.
open PR, workflow passes as expected.
amend the message to remove the pattern. Now no commits in the PR have the pattern force push. Expect workflow to fail
workflow still passes despite no commits in the PR having a the matching pattern
This is my action definition:
name: Jira Message Check
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Commit Message For Jira Tag
uses: gsactions/commit-message-checker@v1
with:
pattern: 'JIRA: (KAT\-[0-9]+|NOJIRA)$'
error: 'You need at least one "JIRA: KAT-<issue number>" line below the title line. If there is no jira associated with this PR/commit you may also use JIRA: NOJIRA. Please see docs/contributing/git-style.rst#submitting-changes for examples'
excludeTitle: 'true'
excludeDescription: 'true'
Could the previous commit messages be still cached somewhere in the workflow, and end up getting passed to the check-commit-message workflow?
a data point to support this theory: if I add checkAllCommitMessages: 'true' to my workflow, it fails as expected since none of the commits contain the pattern.
If I then switch back to the default checkAllCommitMessages: 'false' it incorrectly passes.
Activity