[SERVER-33905] Only run pre-push githooks when the remote URL matches mongodb/mongo Created: 15/Mar/18 Updated: 29/Oct/23 Resolved: 15/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | 3.7.3 |
| Fix Version/s: | 3.7.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Storage NYC 2018-03-26 |
| Participants: |
| Description |
|
Our install-hooks script runs when a user pushes to a remote repo other than "mongodb/mongo", which is annoying when pushing to "master" on a fork that user owns. |
| Comments |
| Comment by Githook User [ 15/Mar/18 ] | |||||||
|
Author: {'email': 'louis.williams@mongodb.com', 'name': 'Louis Williams', 'username': 'louiswilliams'}Message: | |||||||
| Comment by Kyle Suarez [ 15/Mar/18 ] | |||||||
|
I had no idea; that's cool! | |||||||
| Comment by Louis Williams [ 15/Mar/18 ] | |||||||
|
I used the $2 argument, the URL, to match "mognodb/mongo". Not everyone names the "real" remote repo the same, and this will save other people the time of manually editing their pre-push script. | |||||||
| Comment by Kyle Suarez [ 15/Mar/18 ] | |||||||
|
I named the "real" mongodb repository remote "upstream", so I manually patched my own .git/hooks/pre-push to start with:
|