main is what gets deployed, so nothing may reach it without passing review and checks.
Enterprise practice: protected default branch, required status checks, required reviews, signed commits, CODEOWNERS for sensitive paths.
Steps
Branch protection on main: no direct pushes, no force pushes, no deletion
Require the status checks Secret Scan and Lint before merging
Block merging outdated branches, so checks always ran against the latest main
Tools
Gitea branch protection.
Done when
A direct push to main is rejected, and a PR with a failing check can't be merged.
`main` is what gets deployed, so nothing may reach it without passing review and checks.
**Enterprise practice:** protected default branch, required status checks, required reviews, signed commits, CODEOWNERS for sensitive paths.
## Steps
- [x] Branch protection on `main`: no direct pushes, no force pushes, no deletion
- [x] Require the status checks `Secret Scan` and `Lint` before merging
- [x] Block merging outdated branches, so checks always ran against the latest `main`
## Tools
Gitea branch protection.
## Done when
A direct push to `main` is rejected, and a PR with a failing check can't be merged.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
mainis what gets deployed, so nothing may reach it without passing review and checks.Enterprise practice: protected default branch, required status checks, required reviews, signed commits, CODEOWNERS for sensitive paths.
Steps
main: no direct pushes, no force pushes, no deletionSecret ScanandLintbefore mergingmainTools
Gitea branch protection.
Done when
A direct push to
mainis rejected, and a PR with a failing check can't be merged.