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

feat(repository): add new check repository_denies_branch_deletion #6200

Open
wants to merge 2 commits into
base: PRWLR-5537-ensure-force-push-code-to-branches-is-denied
Choose a base branch
from

Conversation

HugoPBrito
Copy link
Member

Context

Allowing users to delete protected branches poses a risk of accidental or intentional data loss, potentially disrupting workflows or losing critical history in the repository. Preventing branch deletions ensures that the integrity and availability of important branches, such as the main branch, are preserved.

Description

This check ensures that branch deletions are denied on protected branches by verifying that the Allow deletions option is disabled in branch protection rules. Enforcing this rule prevents users with push access from removing critical branches, maintaining the stability and continuity of the repository.

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HugoPBrito HugoPBrito requested review from a team as code owners December 13, 2024 23:09
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.

1 participant