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

Turn on branch protection #41

Closed
septract opened this issue Jul 13, 2024 · 11 comments
Closed

Turn on branch protection #41

septract opened this issue Jul 13, 2024 · 11 comments

Comments

@septract
Copy link
Collaborator

We should avoid pushing to main, but also retain the ability to do it if strictly necessary. GitHub offers a few tools to control this - see here.

I would propose we set this up as follows:

  • Forbid pushing to main, and require all commits to go through PR review
  • Allow admins to circumvent this restriction, with the understanding they will only do so in unusual circumstances.
@bcpierce00
Copy link
Collaborator

bcpierce00 commented Jul 15, 2024 via email

@septract
Copy link
Collaborator Author

Separate ticket to discuss rationalizing the directory structure: #43

@dc-mak
Copy link
Collaborator

dc-mak commented Jul 24, 2024

https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-linear-history

Perhaps this (and its pre-reqs) as a minimum to start?

@septract
Copy link
Collaborator Author

Are there counter arguments to just turning on branch protection fully? If we can reach consensus, I'd rather do the right thing first time

@bcpierce00
Copy link
Collaborator

bcpierce00 commented Jul 24, 2024 via email

@septract
Copy link
Collaborator Author

Fully means my original proposal, as opposed to @dc-mak's suggestion (which I took to be a half-way, but maybe that's an incorrect interpretation?)

@dc-mak
Copy link
Collaborator

dc-mak commented Jul 24, 2024

I'm happy with fully, I propose halfway out of pre-emptive pragmatism rather than preference.

@ZippeyKeys12
Copy link
Collaborator

Are the two not independent? We'd like to require PRs, but we'd also like those PRs to be either squashed or rebased?

@septract
Copy link
Collaborator Author

septract commented Aug 2, 2024

Requiring linear history and forbidding pushes direct to main are both good and we should do them both. And no-one seems to have raised any objections to this idea.

@cp526 or someone else with privileges, can you turn this on?

@cp526
Copy link
Collaborator

cp526 commented Aug 6, 2024

@septract If I got it right, this should be in place now: main has to have linear history, and commits to main have to go via pull requests from branches.

@septract
Copy link
Collaborator Author

septract commented Aug 6, 2024

Yes, looks like this is working. Thanks!

@septract septract closed this as completed Aug 6, 2024
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

5 participants