fix: git push hook post receive (#38089)

* fix incorrect delayWriter call (there is already a defer call)
* split HookPostReceive into small functions
* fix incorrect HookPostReceiveResult response for errors
* fix incorrect AddRepoToLicenseUpdaterQueue call
* make sure repo home and branches page can work without default branch
* make sure default branch is always synchronized between database and
git repo, and fix FIXME
This commit is contained in:
wxiaoguang
2026-06-13 04:43:25 +00:00
committed by GitHub
parent 9608cc212d
commit 1b3b4bdd03
15 changed files with 325 additions and 444 deletions
+6 -3
View File
@@ -13,9 +13,12 @@ type PushUpdateOptions struct {
PusherName string
RepoUserName string
RepoName string
RefFullName git.RefName // branch, tag or other name to push
OldCommitID string
NewCommitID string
// FIXME: this struct's design is not right, the changed commits should be in a separate slice
RefFullName git.RefName // branch, tag or other name to push
OldCommitID string
NewCommitID string
}
// IsNewRef return true if it's a first-time push to a branch, tag or etc.