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

fix: Branch name protection fixes #531

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions doc/source/_rulesets/branch_naming.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"id": 2680634,
"name": "Branch naming",
"target": "branch",
"source_type": "Repository",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [
"refs/heads/pre-commit-ci-update-config",
"refs/heads/main",
"refs/heads/gh-pages"
],
"include": [
"~ALL"
]
}
},
"rules": [
{
"type": "deletion"
},
{
"type": "non_fast_forward"
},
{
"type": "branch_name_pattern",
"parameters": {
"operator": "regex",
"pattern": "^(feat|fix|chore|docs|style|refactor|test|testing|perf|ci|no-ci|build|dependabot|release|maint|junk|chore|style|refactor|perf|ci|build)\\/.*",
AlejandroFernandezLuces marked this conversation as resolved.
Show resolved Hide resolved
"negate": false,
"name": ""
}
}
],
"bypass_actors": []
}
9 changes: 0 additions & 9 deletions doc/source/_rulesets/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@
{
"type": "non_fast_forward"
},
{
"type": "branch_name_pattern",
"parameters": {
"operator": "regex",
"pattern": "/release\\/*|feat\\/*|maint\\/*|fix\\/*|junk\\/*|no-ci\\/*|dependabot\\/*|test\\/*|testing\\/*/gm",
"negate": false,
"name": "Branch name must match the regex"
}
},
{
"type": "pull_request",
"parameters": {
Expand Down
1 change: 1 addition & 0 deletions doc/source/how-to/repository-protection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ template files for the branch protection and tag protection rulesets.

Ruleset files:
:download:`Main branch protection ruleset <../_rulesets/main.json>`
:download:`Branch naming protection ruleset <../_rulesets/branch_naming.json>`
:download:`Tag create <../_rulesets/tag-create.json>`
:download:`Tag delete <../_rulesets/tag-delete.json>`

Expand Down
Loading