-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Merge all deleteBranch as one function and also fix bug when delete branch don't close related PRs #16067
Conversation
return err | ||
} | ||
|
||
if err := pull_service.CloseBranchPulls(doer, repo.ID, branchName); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CloseBranchPulls is already called in PushUpdate here:
gitea/services/repository/push.go
Line 216 in ab77a24
if err = pull_service.CloseBranchPulls(pusher, repo.ID, branch); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it's safe to run it twice and there is slight performance reduce. The invoke in push.go
will be invoked from both git command and DeleteBranch
and others.
514aeac
to
cfc0fda
Compare
Codecov Report
@@ Coverage Diff @@
## main #16067 +/- ##
==========================================
- Coverage 44.19% 44.17% -0.03%
==========================================
Files 683 684 +1
Lines 82375 82335 -40
==========================================
- Hits 36409 36373 -36
- Misses 40071 40074 +3
+ Partials 5895 5888 -7
Continue to review full report at Codecov.
|
…ranch don't close related PRs (go-gitea#16067) * Fix bug when delete branch don't close related PRs * Merge all deletebranch as one method * Add missed branch.go * fix comment Co-authored-by: Lauris BH <[email protected]>
…ranch don't close related PRs (#16067) (#16097) * Fix bug when delete branch don't close related PRs * Merge all deletebranch as one method Co-authored-by: Lauris BH <[email protected]>
…ranch don't close related PRs (go-gitea#16067) * Fix bug when delete branch don't close related PRs * Merge all deletebranch as one method * Add missed branch.go * fix comment Co-authored-by: Lauris BH <[email protected]>
As title.