fix(webhook): deliver create events for tag pushes - #38639
Open
majorissuerep wants to merge 6 commits into
Open
Conversation
Tag create/delete webhooks were incorrectly subject to branch_filter after the tag-push filter fix, so a create-only hook with a branch-oriented filter (e.g. master) never fired for git tag pushes (go-gitea#38438). - Apply branch_filter only to push events and branch create/delete - Keep filtering tag *push* events (preserves go-gitea#35449 / go-gitea#35567) - Emit CreateRef for new tags even when GetCommit fails - Add unit and integration coverage for create-only tag push Fixes go-gitea#38438 Assisted-by: hermes:grok-4.5
added 4 commits
July 26, 2026 15:55
Assisted-by: hermes:grok-4.5
Assisted-by: hermes:grok-4.5
Contributor
Author
|
#38438 updated — tag create deliveries restored under branch-oriented filters; Assisted-by: Hermes:glm-5.2 |
Assisted-by: Hermes:grok-4.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #38438.
Create-only webhooks stopped receiving tag create deliveries when a branch-oriented
branch_filter(e.g.master/main) was set. That came from #35567 applying the branch filter to tag create/delete payloads, not only to tag push payloads.Also, tag
CreateRefwas nested under a successfulGetCommit, so a missing/unreadable peeled commit dropped the create event entirely even though the tag ref was created.Changes
CreateReffor new tags independently ofGetCommitTest plan
go test ./services/webhook/ ./services/repository/make test-integration#Test_WebhookCreateTagViaGitPushmake test-integration#Test_WebhookCreateTagViaAPImake test-integration#Test_WebhookCreate(branch create regression)master(branch-oriented)git tag webhook-create-tag-38438 && git push origin refs/tags/webhook-create-tag-38438X-Gitea-Event: create,ref_type=tagProof (local)
services/webhook,services/repository)master: PASSAI assistance used for implementation and tests; changes reviewed and exercised locally via the commands above.