branch protection for main #134

Open
opened 2026-07-04 03:55:04 +02:00 by AramJonghu · 2 comments
Collaborator

Setting branch protections to main could prevent accidental pushes to main and/or PR's to be merged without critical CI/CD. PR's to main also require at least 1 approval (repo owner exempted of this rule).

Currently set branch protections wich can be seen, edited, and disabled in Settings -> Branches -> Branch Protection. Repo owner @zach is exempt since main commits are convenient in case of small hotfixes.
If contributers feel comfortable, perhaps restricting pushes to main for everyone could be a next step. Force pushes could then be kept enabled for owner in the use case of pushing a hotfix to main branch.
Here is how a PR now looks like, with the example of #129:
image.png

Let me know of how the changes feel (for example in PR's). This should be considered an experiment.

Setting branch protections to main could prevent accidental pushes to main and/or PR's to be merged without critical CI/CD. PR's to main also require at least 1 approval (repo owner exempted of this rule). Currently set branch protections wich can be seen, edited, and disabled in Settings -> Branches -> Branch Protection. Repo owner @zach is exempt since main commits are convenient in case of small hotfixes. If contributers feel comfortable, perhaps restricting pushes to main for everyone could be a next step. Force pushes could then be kept enabled for owner in the use case of pushing a hotfix to main branch. Here is how a PR now looks like, with the example of #129: ![image.png](/attachments/5f9e3f87-7d1b-4590-b159-ae1a81b20d9e) Let me know of how the changes feel (for example in PR's). This should be considered an experiment.
328 KiB
AramJonghu added the enhancement label 2026-07-04 03:55:04 +02:00
AramJonghu self-assigned this 2026-07-04 03:55:04 +02:00
AramJonghu added this to the Zshell board project 2026-07-04 03:55:04 +02:00
AramJonghu moved this to Review in Zshell board on 2026-07-04 03:55:11 +02:00
Owner

I do not think this is necessary. This would only be necessary if I were to add untrusted people to Collaborators, which I wouldn't.

I do not think this is necessary. This would only be necessary if I were to add untrusted people to Collaborators, which I wouldn't.
Author
Collaborator

I believe there is real value in preventing accidental pushes and merges. I know I have made that mistake due to the lack of branch protections.

We can keep you excempt or other contributers if you have no interest. I believe there is real value here preventing mistakes.

It does not have to be necessary to implement.

I believe there is real value in preventing accidental pushes and merges. I know I have made that mistake due to the lack of branch protections. We can keep you excempt or other contributers if you have no interest. I believe there is real value here preventing mistakes. It does not have to be necessary to implement.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zach/z-bar-qt#134