Merge pull request 'fix(gitea-mcp): add fix/* and other branch patterns to permissions' (#219) from fix/branch-permission-patterns into development

Reviewed-on: #219
This commit was merged in pull request #219.
This commit is contained in:
2026-01-27 19:42:02 +00:00
2 changed files with 14 additions and 2 deletions

View File

@@ -66,7 +66,13 @@ class IssueTools:
return operation in ['list_issues', 'get_issue', 'get_labels', 'create_issue'] return operation in ['list_issues', 'get_issue', 'get_labels', 'create_issue']
# Development branches (full access) # Development branches (full access)
if branch in ['development', 'develop'] or branch.startswith(('feat/', 'feature/', 'dev/')): # Include all common feature/fix branch patterns
dev_prefixes = (
'feat/', 'feature/', 'dev/',
'fix/', 'bugfix/', 'hotfix/',
'chore/', 'refactor/', 'docs/', 'test/'
)
if branch in ['development', 'develop'] or branch.startswith(dev_prefixes):
return True return True
# Unknown branch - be restrictive # Unknown branch - be restrictive

View File

@@ -69,7 +69,13 @@ class PullRequestTools:
return operation in read_ops + ['add_pr_comment'] return operation in read_ops + ['add_pr_comment']
# Development branches (full access) # Development branches (full access)
if branch in ['development', 'develop'] or branch.startswith(('feat/', 'feature/', 'dev/')): # Include all common feature/fix branch patterns
dev_prefixes = (
'feat/', 'feature/', 'dev/',
'fix/', 'bugfix/', 'hotfix/',
'chore/', 'refactor/', 'docs/', 'test/'
)
if branch in ['development', 'develop'] or branch.startswith(dev_prefixes):
return True return True
# Unknown branch - be restrictive # Unknown branch - be restrictive