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

Prevent contributors from opening a PR on a main branch of their fork #6404

Closed
lucasbordeau opened this issue Jul 25, 2024 · 1 comment
Closed
Labels

Comments

@lucasbordeau
Copy link
Contributor

lucasbordeau commented Jul 25, 2024

Scope & Context

Code review is difficult when the PR of a contributor comes from the main branch of his fork. Because pulling, merging, rebasing is not straightforward.

We want to enforce PR from a custom branch, not main branch.

Could we find a way to prevent this on GitHub ? Maybe be with a git hook or a rule of some kind ?

We could maybe also add some mention to this in the How to contribute section somewhere ?

charlesBochet pushed a commit that referenced this issue Jul 26, 2024
#6404

Used a Git hook`(pre-push)` to prevent pull requests from being created
from the main branch.
pre-push hook ref: https://git-scm.com/docs/git-push
@lucasbordeau
Copy link
Contributor Author

Closed by #6419

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Product development ✅ Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant