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

Replaced pre-commit githook with pre-push #20784

Merged
merged 5 commits into from
Apr 18, 2024

Conversation

sureshjoshi
Copy link
Member

The fact that we wrote:

you may find it annoying to have these run every time, so installing this hook is not required

explains why I'm making this change :)

Closes #20541

@@ -61,32 +61,30 @@ To free up space, run `rm -rf src/rust/engine/target`.
Warning: this will cause Rust to recompile everything.
:::

## Step 3: (Optional) Set up a Git hook
## Step 3: Set up a pre-push Git Hook
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing "Optional"

Seems weird to write that in the development docs. For the people who develop often, they're used to the workflow and can do as they please anyways.

For those who are new to committing to Pants, this feels like a simple thing that would be nice to save some CI loops.


To install this, run:

```bash
$ build-support/bin/setup.sh
```

If you commit frequently as part of your workflow you may find it annoying to have these run every time, so installing this hook is not required.
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing "Optional".

The frequency of run is now substantially lower, since it's on push instead of commit.

@sureshjoshi
Copy link
Member Author

@kaos Just a heads up that I added a function which will look for broken symlinks in the githooks, and ask the user if they want to delete it.

Just a bit of house keeping.

build-support/bin/install_git_hooks.sh Outdated Show resolved Hide resolved
@sureshjoshi sureshjoshi merged commit 7a11f54 into pantsbuild:main Apr 18, 2024
24 checks passed
@sureshjoshi sureshjoshi deleted the 20541-pre-push branch April 18, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace pre-commit with pre-push
2 participants