-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commit message linter only checks top-most commit in a git tree #309
Labels
Milestone
Comments
We expected CircleCI to run the test on every commit in a PR but apparently it doesn't. So we'll put in a fix. Thanks for catching it! |
nishakm
added
bug
Something went wrong
CI/CD
Continuous Integration and Continuous Delivery
tests
Issues related to testing the code
labels
Jun 12, 2019
rnjudge
added a commit
to rnjudge/tern
that referenced
this issue
Jun 12, 2019
In a previous commit (0cba95a) test_commit_message.py was introduced under the assumption that circleci would run against all commits. We soon realized that this was not the case and in fact we were only checking the HEAD commit. This commit introduces the following changes: 1) Creates a new direrctory called 'ci' 2) Moves test_commit_message.py from 'tests' to 'ci' 3) Made moderate edits to test_commit_message.py in order to create a separate commit message linting function. Also updated the error messages to specify the offending commit. Resolves tern-tools#309 Signed-off-by: Rose Judge <[email protected]>
rnjudge
added a commit
to rnjudge/tern
that referenced
this issue
Jun 12, 2019
In a previous commit (0cba95a) test_commit_message.py was introduced under the assumption that circleci would run against all commits. We soon realized that this was not the case and in fact we were only checking the HEAD commit. This commit introduces the following changes: 1) Creates a new directory called 'ci' 2) Moves test_commit_message.py from 'tests' to 'ci' 3) Made moderate edits to test_commit_message.py in order to create a separate commit message linting function. Also updated the error messages to specify the offending commit. Resolves tern-tools#309 Signed-off-by: Rose Judge <[email protected]>
nishakm
pushed a commit
that referenced
this issue
Jun 12, 2019
In a previous commit (0cba95a) test_commit_message.py was introduced under the assumption that circleci would run against all commits. We soon realized that this was not the case and in fact we were only checking the HEAD commit. This commit introduces the following changes: 1) Creates a new directory called 'ci' 2) Moves test_commit_message.py from 'tests' to 'ci' 3) Made moderate edits to test_commit_message.py in order to create a separate commit message linting function. Also updated the error messages to specify the offending commit. Resolves #309 Signed-off-by: Rose Judge <[email protected]>
rnjudge
added a commit
that referenced
this issue
Aug 28, 2019
In a previous commit (0cba95a) test_commit_message.py was introduced under the assumption that circleci would run against all commits. We soon realized that this was not the case and in fact we were only checking the HEAD commit. This commit introduces the following changes: 1) Creates a new directory called 'ci' 2) Moves test_commit_message.py from 'tests' to 'ci' 3) Made moderate edits to test_commit_message.py in order to create a separate commit message linting function. Also updated the error messages to specify the offending commit. Resolves #309 Signed-off-by: Rose Judge <[email protected]>
rnjudge
added a commit
to rnjudge/tern
that referenced
this issue
Jun 5, 2020
In a previous commit (0cba95a) test_commit_message.py was introduced under the assumption that circleci would run against all commits. We soon realized that this was not the case and in fact we were only checking the HEAD commit. This commit introduces the following changes: 1) Creates a new directory called 'ci' 2) Moves test_commit_message.py from 'tests' to 'ci' 3) Made moderate edits to test_commit_message.py in order to create a separate commit message linting function. Also updated the error messages to specify the offending commit. Resolves tern-tools#309 Signed-off-by: Rose Judge <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The git commit linter
test_commit_message.py
introduced in #302 only checks the gitHEAD
(usually the top-most commit in the current git branch). Therefore for multi-patch pull requests only the final patch has its commit message linted.To Reproduce
Steps to reproduce the behavior:
.circleci/config.yml
--python tests/test_commit_message.py
Expected behavior
The linter should check each commit in the PR.
A reasonable approach might be to split the linting logic into a function, compare the current branch to origin/master and run the linter against each message that exists in the current branch but not in origin/master.
The error message will need be updated, I'd like to see it report the short commit hash (
git rev-parse --short COMMITSHA
), and perhaps the title, of the message which triggered an error, rather than just the offending line. That would make it easier to find the offending commit in an interactive rebase.The text was updated successfully, but these errors were encountered: