Openwisp-utils: [qa] Commit message check fails if there's a dot after the issue

Created on 7 May 2021  ·  9Comments  ·  Source: openwisp/openwisp-utils

All 9 comments

Can I do this issue

Sure @keshavgbpecdelhi go ahead

@devkapilbansal can you tell were to do changes (which code required modification)

I think you need to fix this function
https://github.com/openwisp/openwisp-utils/blob/1f73cc3d522478cd34bd6f10d3dfa98be12e4263/openwisp_utils/qa.py#L83

I tried looking at that issue and found that regex is returning #344. from long description which is then matched with #344 from short description and the tests failed because #344. is not same as #344

Do we have to add "." in the skip case?
skip_cases = [
# merges
r'^Merge pull request #[A-Za-z0-9.]* from',
r"^Merge branch '(.?)' into",
# releases
r'^[A-Za-z0-9.]
release$',
r"^Bumped VERSION to (.?)$",
r"^Bump (.
?) from (.?) to (.?)$",
]

It is for short description only

@keshavgbpecdelhi did you tried going throigh the code once and undertand what's going there ? The best way to fix the error is to try reproduce it locally, see which part of code is responsible for that, writing a test case that will fail for sure unless the error is fixed and then solving the error.

@keshavgbpecdelhi first step is to write a failing test to replicate the issue, see https://github.com/openwisp/openwisp-utils/blob/master/tests/test_project/tests/test_qa.py#L79-L135.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nemesisdesign picture nemesisdesign  ·  5Comments

atb00ker picture atb00ker  ·  13Comments

atb00ker picture atb00ker  ·  9Comments

ghost picture ghost  ·  3Comments

mitsuhiko picture mitsuhiko  ·  3Comments