-
-
Notifications
You must be signed in to change notification settings - Fork 54
Refactor code for maintainabilty #206
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
Conversation
cb9243b to
51d5c96
Compare
51d5c96 to
758f86a
Compare
|
This PR is so big... I started to split it to speed up review and merges. |
Please note that previous commit introduced some offences that will be fixed in upcomming commits (some are already available in voxpupuli#206
Please note that previous commit introduced some offences that will be fixed in upcomming commits (some are already available in voxpupuli#206
Please note that previous commit introduced some offences that will be fixed in upcomming commits (some are already available in voxpupuli#206
Please note that previous commit introduced some offences that will be fixed in upcomming commits (some are already available in voxpupuli#206
758f86a to
020c608
Compare
2a43a87 to
36fb210
Compare
36fb210 to
5f023d3
Compare
8ae088c to
7fd4261
Compare
|
This PR is stalled, waiting #219 to be merged. |
7fd4261 to
c9561eb
Compare
c9561eb to
2492cf4
Compare
Codecov Report
@@ Coverage Diff @@
## master #206 +/- ##
==========================================
+ Coverage 84.76% 85.93% +1.16%
==========================================
Files 30 30
Lines 906 917 +11
==========================================
+ Hits 768 788 +20
+ Misses 138 129 -9
Continue to review full report at Codecov.
|
cac2762 to
8c8d4ad
Compare
This commit reduces the default output verbosity but allow user to increase it through `--verbose` option.
8c8d4ad to
c31c64c
Compare
During debug, the following git error raised: fatal: ambiguous argument 'XXX': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' With the git help recommandation the error is (a bit) more explicit: fatal: bad revision 'XXX'
c31c64c to
5a03a6d
Compare
|
To end the story, this PR have been split in several PRs:
Its now time to append some various improvements I noted during refactoring. |
smortex
left a comment
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.
LGTM
| end | ||
|
|
||
| class Hook < Thor | ||
| class_option :project_root, |
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.
can you explain why you drop the parameter? that means we need to do a major release?
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.
can you explain why you drop the parameter?
Yes, its not used in hook.
that means we need to do a major release?
No, I do not think so. I was just a extra parameter with no effect, AFAICS.
ekohl
left a comment
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.
Overall this looks good.
| endpoint += '/api/v4' | ||
| endpoint |
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.
Another way of writing this (but I'm not sure this is clearer)
| endpoint += '/api/v4' | |
| endpoint | |
| endpoint + '/api/v4' |
This PR improves code structure to help owners to maintain the code and contributors to add features.
About the maintainability, this PR attempts to:
optionswere passed to many methods)rubocophappier ;-)This PR also adds tests for bump, tag and changelog features.
To help contributors, this PR renames some methods with IMHO more explicit names and organizes code into classes.
Even
msynchave been made to manage Puppet modules, there are some users which use it for other purpose (e.g. @raphink wrote https://dev.to/camptocamp-ops/templating-puppet-control-repositories-3pk7) so I started to split specific code intoPuppetModuleclass, while generic one is now inSourceCodeclass.More details in commit logs.