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
regex not matching head commit but rather the PR title #67
- name: validate commit format -- Check if HEAD commit message contains [xyz] or FAIL.uses: gsactions/commit-message-checker@v1with:
pattern: '\[[^]]+\]'flags: 'gm'error: 'Your commit must contain `[..]` like "[BUGFIX] or [SDK-974]".'#checkAllCommitMessages: 'false' # optional: this checks all commits associated with a pull request#accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true#pattern: '^[^#].{74}' error: 'The maximum line length of 74 characters is exceeded.'#excludeDescription: 'true' # optional: this excludes the description body of a pull request#excludeTitle: 'true' # optional: this excludes the title of a pull request#pattern: '^.+(Resolves|Fixes): \#[0-9]+$' # Check for Resolves / Fixes
Current Behavior
The above mentioned yaml is not working on head commit but rather the PR title. i wish to check on just the head commit and not enforce namings on PR title/ description
Expected Behavior
expected the regex '\[[^]]+\]' to match for commit [FIX] [SDK-974] validate head commit format (should be successful) , but not sure why it isn't matching . on regex101 site, it seems to work correctly. : https://regex101.com/r/VapGyU/1
Steps To Reproduce
run the above yaml mentioned in any github runner and you will find the title getting validated but not the head commit
Activity
gilbertsoft commentedon Mar 21, 2022
Hey @root-ansh-ct
As long as you don't set
checkAllCommitMessagestotrueonly the PR tile and description are used as written here https://github.com/GsActions/commit-message-checker#configuration.And also check how to debug the action here https://github.com/GsActions/commit-message-checker#troubleshooting-and-debugging.