mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 17:17:19 +00:00
Fix lint
This commit is contained in:
@ -629,6 +629,8 @@ func (errs errlist) Error() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ error = &errlist{}
|
||||||
|
|
||||||
// RetargetBranchPulls change target branch for all pull requests whose base branch is the branch
|
// RetargetBranchPulls change target branch for all pull requests whose base branch is the branch
|
||||||
// Both branch and targetBranch must be in the same repo (for security reasons)
|
// Both branch and targetBranch must be in the same repo (for security reasons)
|
||||||
func RetargetBranchPulls(ctx context.Context, doer *user_model.User, repoID int64, branch, targetBranch string) error {
|
func RetargetBranchPulls(ctx context.Context, doer *user_model.User, repoID int64, branch, targetBranch string) error {
|
||||||
@ -716,7 +718,10 @@ func ClosePullsCausedByBranchDeleted(ctx context.Context, doer *user_model.User,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return errs
|
if len(errs) > 0 {
|
||||||
|
return errs
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// CloseRepoBranchesPulls close all pull requests which head branches are in the given repository, but only whose base repo is not in the given repository
|
// CloseRepoBranchesPulls close all pull requests which head branches are in the given repository, but only whose base repo is not in the given repository
|
||||||
|
@ -282,7 +282,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = pull_service.ClosePullsCausedByBranchDeleted(ctx, pusher, repo.ID, branch); err != nil {
|
if err := pull_service.ClosePullsCausedByBranchDeleted(ctx, pusher, repo.ID, branch); err != nil {
|
||||||
// close all related pulls
|
// close all related pulls
|
||||||
log.Error("close related pull request failed: %v", err)
|
log.Error("close related pull request failed: %v", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user