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

Add a pre-push hook #119

Open
rehandalal opened this issue Apr 20, 2020 · 4 comments
Open

Add a pre-push hook #119

rehandalal opened this issue Apr 20, 2020 · 4 comments
Assignees

Comments

@rehandalal
Copy link
Owner

We should add an option to install a pre-push hook instead or alongside the pre-commit hook.

@rehandalal rehandalal self-assigned this Apr 20, 2020
@sauravjha
Copy link

Hi Rehadalal,

How can we get this feature working? I tried the same script that is used for the pre-commit hook for pre-push hook but does not seems to be working.

@rehandalal
Copy link
Owner Author

Hi! Thanks for your comment. Are you currently using therapist on your project(s)?

This was just an idea I had and I have not done much of a dive into it yet. I suspected the pre-commit hook would not work out the box because it looks for uncommitted code. At the time a push is occurring there is probably not any uncommitted code. With a pre-push hook we likely want to pass through all the tracked code but ignore any unstaged changes. So the line 18 of the hook would likely need to be modified with the appropriate options to account for all of that.

@sauravjha
Copy link

Hi,
Thanks for getting back. Yes, we have some team members in our project using it. I think you meant pre-push hook would not work out of the box.

@rehandalal
Copy link
Owner Author

I think you meant pre-push hook would not work out of the box.

There currently is no pre-push hook. I meant that the existing pre-commit hook would not work out the box as a pre-push hook. It would need to be modified.

But now that I know this would be useful to a group of people using Therapist I'll bump it up in priority and hopefully get a new version out with built-in pre-push hook support shortly.

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

No branches or pull requests

2 participants