-
-
Notifications
You must be signed in to change notification settings - Fork 72
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 bug fix : dot after the issue #187 #256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a failing test, then the patch should fix the failing test.
Didn't get it 🤔 |
@keshavgbpecdelhi You need to write a test that fails before your change and after introducing your change it passes. See this: openwisp-utils/tests/test_project/tests/test_qa.py Lines 137 to 143 in 9e182fd
Add a test that fails when there is a dot in the commit message as mentioned in the issue and will pass if your changes are introduced in the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keshavgbpecdelhi You need to write a test that fails before your change and after introducing your change it passes.
See this:
openwisp-utils/tests/test_project/tests/test_qa.py
Lines 137 to 143 in 9e182fd
@capture_stderr() def test_qa_call_check_commit_message_failure(self): options = [ ['commitcheck'], ['commitcheck', '--quiet', '--message', 'Hello World'], ['commitcheck', '--quiet', '--message', '[qa] hello World'], ['commitcheck', '--quiet', '--message', '[qa] Hello World.'], Add a test that fails when there is a dot in the commit message as mentioned in the issue and will pass if your changes are introduced in the code.
Exactly, thank you @codesankalp.
It may be possible that the long description contains more lines after the issue closing line, Like:-
If yes, in that case your proposed solution will not work @keshavgbpecdelhi |
Sir if we remove the "." from long_desc like this : |
I found one more way :
|
We don't want to remove dot. Just wanna ignore it. So, we can just replace |
Just my two cents: The problem is not the dot here. It is the regex which look for " #". The question asked should be, why is it considering "." to be a part of the check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing test still missing.
See the first point of this section in the django docs:
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#bugs
A regression test is a requirement for bug fixes in many modern open source projects.
Superseeded by #267 |
Issue : #187
Changes
The problems like this https://github.com/openwisp/openwisp-controller/runs/2529479318 when placing a fullstop at the end of long description, is fixed.
Checklist