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

chore: Add precommit hook to prevent committing to protected branches #786

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattrunyon
Copy link
Collaborator

Figured since we have pre-commit hooks, we could add one to prevent accidentally committing to main and release branches.

I tested this w/ main and it doesn't let me commit without bypassing the hook. Doesn't prevent anything if you don't have the hooks obviously, but at least useful for those of us w/ admin so we don't accidentally do it.

I don't know how this would affect the release process. We might need to add SKIP=no-commit-to-branch to the release process if it's run locally w/ git that follows the pre-commit hooks

@mattrunyon mattrunyon self-assigned this Aug 29, 2024
@jnumainville
Copy link
Collaborator

Looks good to me, but I'm not sure about the release part myself

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.

2 participants