-
Couldn't load subscription status.
- Fork 17
ENH: Migrate Gerrit to GitHub hooks #49
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
ENH: Migrate Gerrit to GitHub hooks #49
Conversation
827c5f2 to
b2aef66
Compare
| # Alias to push the current topic branch to GitHub | ||
| git config alias.review-push "!bash Utilities/GitSetup/git-review-push" | ||
|
|
||
| git config alias.gerrit-push \ |
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.
Is this gerrit alias still necessary?
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.
This is to help transition for folks with old documentation or habits.
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.
OK.
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.
Hey @thewtex this is awesome !! Do you need me to test it locally? If yes, how should I proceed?
|
@jhlegarreta Yes, your help testing would be appreciated! This should enable testing: After running |
8de360c to
5b06e00
Compare
|
Thanks @thewtex.
😑 |
|
Thanks for the review, @jhlegarreta !
I don't follow -- what is the ITK standard prefix?
Good.
|
Sorry, I meant The ITK commit message standard prefix message did not show up:
OK, then I missed the PR number. I've tried with a given PR number: So it does work 👌 Just to ensure that the system is wise-enough, I did: And nothing is displayed, since #48 has been merged already. So this is quite nice ! If an argumentless |
Ah, good point! I copied the
I added an updated alias for this, too, in the next revision. I added support to |
5b06e00 to
8703297
Compare
Disable the Gerrit commit message Change-Id addition hook. Add the `.hooks-config.bash` script to call additional custom hooks in ITKSoftwareGuide/Utilities/Hooks. Add a pre-commit hook that checks the SetupForDevelopment.sh script version. The helps force updates to the Git configuration on existing systems when required. Add a commit-msg hook that checks for the format of the commit message (copied from ITK). Add git alias for `git review-push`. This replaces `git gerrit-push`. `review-push` is a common alias and ensures we do not have change the alias name if we ever switch review platforms again. `gerrit-push` give a deprecation message. `git pr` alias is added to easily check out existing pull requests locally. `git pr-clean` cleans up the pr checkouts. From: https://github.com/TeamPorcupine/ProjectPorcupine/wiki/How-to-Test-a-Pull-Request Utilites/GitSetup/{setup-github,setup-upstream} are added to help configure `origin`, which points to the user's forked repository and `upstream`, which points to the upstream repository. This follows standard GitHub remote naming conventions: https://gist.github.com/Chaser324/ce0505fbed06b947d962 A different name for the forked repository remote name other than `origin` can be specified if desired.
8703297 to
5669105
Compare
|
I checked that: I'm using the and It indeed makes sense to print the usage instead of fetching all PR's as I previously imagined/suggested. So 👌 While in a local branch, I did 👌 A for the Simply brilliant. Then, this is ready to be merged. Thanks @thewtex !! |
|
Thanks for the testing and feedback, @jhlegarreta ! |
Disable the Gerrit commit message Change-Id addition hook.
Add the
.hooks-config.bashscript to call additional custom hooks inITKSoftwareGuide/Utilities/Hooks.
Add a pre-commit hook that checks the SetupForDevelopment.sh script version.
The helps force updates to the Git configuration on existing systems when
required.
Add a commit-msg hook that checks for the format of the commit message (copied
from ITK).
Add git alias for
git review-push. This replacesgit gerrit-push.review-pushis a common alias and ensures we do not have change the aliasname if we ever switch review platforms again.
gerrit-pushgive adeprecation message.
git pralias is added to easily check out existing pull requests locally.git pr-cleancleans up the pr checkouts. From:https://github.com/TeamPorcupine/ProjectPorcupine/wiki/How-to-Test-a-Pull-Request
Utilites/GitSetup/{setup-github,setup-upstream} are added to help configure
origin, which points to the user's forked repository andupstream, whichpoints to the upstream repository. This follows standard GitHub remote naming
conventions:
https://gist.github.com/Chaser324/ce0505fbed06b947d962
A different name for the forked repository remote name other than
origincanbe specified if desired.