1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-07 10:08:20 +00:00

Fix actions notify bug (#31866)

Try to fix
https://github.com/go-gitea/gitea/issues/31757#issuecomment-2295131062
This commit is contained in:
Lunny Xiao
2024-08-20 00:25:41 +08:00
committed by GitHub
parent 36232b69db
commit 4f5c96627b
3 changed files with 18 additions and 13 deletions

View File

@@ -386,7 +386,7 @@ func (n *actionsNotifier) ForkRepository(ctx context.Context, doer *user_model.U
// Add to hook queue for created repo after session commit.
if u.IsOrganization() {
newNotifyInput(repo, doer, webhook_module.HookEventRepository).
WithRef(oldRepo.DefaultBranch).
WithRef(git.RefNameFromBranch(oldRepo.DefaultBranch).String()).
WithPayload(&api.RepositoryPayload{
Action: api.HookRepoCreated,
Repository: convert.ToRepo(ctx, repo, access_model.Permission{AccessMode: perm_model.AccessModeOwner}),