0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-11 09:53:09 +01:00

remove unused parameter

This commit is contained in:
Lunny Xiao 2024-05-02 22:19:06 +08:00
parent 26bd1cddb6
commit 2daf7225e6

View file

@ -63,11 +63,11 @@ func CanUserWriteToBranch(ctx context.Context, p access_model.Permission, headRe
return true return true
} }
return canMaintainerWriteToHeadBranch(ctx, p, headRepoID, branch, user) return canMaintainerWriteToHeadBranch(ctx, headRepoID, branch, user)
} }
// canMaintainerWriteToHeadBranch check whether user is a maintainer and could write to the branch // canMaintainerWriteToHeadBranch check whether user is a maintainer and could write to the branch
func canMaintainerWriteToHeadBranch(ctx context.Context, p access_model.Permission, headRepoID int64, branch string, user *user_model.User) bool { func canMaintainerWriteToHeadBranch(ctx context.Context, headRepoID int64, branch string, user *user_model.User) bool {
prs, err := GetUnmergedPullRequestsByHeadInfo(ctx, headRepoID, branch) prs, err := GetUnmergedPullRequestsByHeadInfo(ctx, headRepoID, branch)
if err != nil { if err != nil {
log.Error("GetUnmergedPullRequestsByHeadInfo: %v", err) log.Error("GetUnmergedPullRequestsByHeadInfo: %v", err)