Skip to content
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

fix: make pre-push opt-in #244

Merged
merged 1 commit into from
Jul 5, 2018
Merged

fix: make pre-push opt-in #244

merged 1 commit into from
Jul 5, 2018

Conversation

vmx
Copy link
Member

@vmx vmx commented Jun 27, 2018

The pre-push package always runs npm test even if there is no pre-push
section in your package.json. By switching to the git-validate package,
running pre push hooks is completely opt-in. Nothing will be run if there
is no pre-push section.

This doesn't change the behaviour of repositories that have some pre-push
targets set, as git-validate uses the same syntax as pre-push.

This change relates to #242.

The `pre-push` package always runs `npm test` even if there is no `pre-push`
section in your package.json. By switching to the `git-validate` package,
running pre push hooks is completely opt-in. Nothing will be run if there
is no `pre-push` section.

This doesn't change the behaviour of repositories that have some `pre-push`
targets set, as `git-validate` uses the same syntax as `pre-push`.

This change relates to #242.
@vmx vmx requested review from victorb and daviddias June 27, 2018 13:33
@ghost ghost assigned vmx Jun 27, 2018
@ghost ghost added the status/in-progress In progress label Jun 27, 2018
@vmx
Copy link
Member Author

vmx commented Jun 27, 2018

I've tested what happens with the pre-push hooks when you upgrade AEgir with this patch applied. It will correctly remove the pre-push package hook and install the git-validate hook. So it seems to be the perfect replacement.

Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@daviddias
Copy link
Member

@victorbjelkholm can you merge and release this one?

@victorb victorb merged commit 061d90a into master Jul 5, 2018
@ghost ghost removed the status/in-progress In progress label Jul 5, 2018
@daviddias daviddias deleted the git-validate branch July 5, 2018 10:54
@jacobheun jacobheun mentioned this pull request Jul 16, 2018
@vmx vmx restored the git-validate branch July 19, 2018 17:31
@hugomrdias hugomrdias deleted the git-validate branch April 20, 2020 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants