-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Open
Labels
type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
Feature Description
#16395 explicitly had a non-goal of applying the unprotected file pattern configuration to changes made via the editor (implicitly, merging in PRs was also a non-goal).
To make the unprotected file pattern feature be consistent, it should apply to all ways that commits can be made to a branch.
"Unprotected file patterns" implemented:
- direct commits via the CLI:
gitea/routers/private/hook_pre_receive.go
Line 295 in 14bb8f7
globs := protectBranch.GetUnprotectedFilePatterns()
"Unprotected file patterns" missing:
- commits made in the UI/API (via PR merges):
Line 504 in 14bb8f7
func IsUserAllowedToMerge(ctx context.Context, pr *issues_model.PullRequest, p access_model.Permission, user *user_model.User) (bool, error) { - commits made in the editor:
gitea/services/context/repo.go
Line 111 in 14bb8f7
func (r *Repository) CanCommitToBranch(ctx context.Context, doer *user_model.User) (CanCommitToBranchResults, error) {
gitea/routers/web/repo/editor.go
Line 47 in 14bb8f7
func renderCommitRights(ctx *context.Context) bool {
Screenshots
No response
Metadata
Metadata
Assignees
Labels
type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity