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 12:43:25 +08:00
committed by GitHub
parent 9608cc212d
commit 1b3b4bdd03
15 changed files with 325 additions and 444 deletions
+6 -2
View File
@@ -4,7 +4,6 @@
<div class="ui container">
{{template "base/alert" .}}
{{template "repo/sub_menu" .}}
{{if .DefaultBranchBranch}}
<h4 class="ui top attached header">
{{ctx.Locale.Tr "repo.default_branch"}}
{{if and $.IsWriter $.Repository.CanContentChange (not .IsDeleted)}}
@@ -14,7 +13,8 @@
{{end}}
</h4>
<div class="ui attached table segment">
{{if .DefaultBranchBranch}}
<div class="ui attached table segment" data-testid="branches-default-branch-list">
<table class="ui very basic fixed table single line">
<tbody>
<tr>
@@ -69,6 +69,10 @@
</tbody>
</table>
</div>
{{else}}
<div class="ui attached segment" data-testid="branches-default-branch-not-exist">
{{ctx.Locale.Tr "repo.branch.default_branch_not_exist" $.Repository.DefaultBranch}}
</div>
{{end}}
<h4 class="ui top attached header">