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 git precommit hooks #75

Open
MeltyBot opened this issue Apr 5, 2022 · 0 comments
Open

Add git precommit hooks #75

MeltyBot opened this issue Apr 5, 2022 · 0 comments

Comments

@MeltyBot
Copy link

MeltyBot commented Apr 5, 2022

Migrated from GitLab: https://gitlab.com/meltano/handbook/-/issues/82

Originally created by @cjohnhanson on 2022-04-05 20:02:43


Before commit:

  • Changed files should be linted
  • Local branch being committed to should be up to date with master in this meltano/handbook repo
    • We would need to either just fail with an informative warning if branch isn't up to date or if we wanted to automatically pull, we would need to be smart about that behavior--how should it merge? What happens if a pull would overwrite local changes?

We can probably do this by:

  1. Creating a new .githook directory with a precommit script
  2. Adding a preinstall script in package.json which does a git config core.hooksPath .githooks so that precommit hooks are "installed" whenever npm install is run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant