Skip to content

Conversation

GiteaBot
Copy link
Collaborator

@GiteaBot GiteaBot commented Oct 3, 2025

Backport #35567 by @Exgene

Tag creation/deletion was triggering push webhooks even when branch
filters were configured, causing unintended pipeline executions.

This change modifies the branch filter logic to check the full ref
name directly instead of first determining if it's a "branch" event.

Fixes: Tag events now properly respect branch filters

  • Add getPayloadRef() function to extract full ref names
  • Update PrepareWebhook() to use direct ref matching
  • Prevents refs/tags/* from matching refs/heads/* filters

Closes #35449

…go-gitea#35449 (go-gitea#35567)

Tag creation/deletion was triggering push webhooks even when branch
filters were configured, causing unintended pipeline executions.

This change modifies the branch filter logic to check the full ref
name directly instead of first determining if it's a "branch" event.

Fixes: Tag events now properly respect branch filters
- Add getPayloadRef() function to extract full ref names
- Update PrepareWebhook() to use direct ref matching
- Prevents refs/tags/* from matching refs/heads/* filters

Closes go-gitea#35449

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
@GiteaBot GiteaBot added modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation type/bug labels Oct 3, 2025
@GiteaBot GiteaBot added this to the 1.25.0 milestone Oct 3, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 3, 2025
@GiteaBot GiteaBot requested review from lunny and wxiaoguang October 3, 2025 17:21
@wxiaoguang wxiaoguang enabled auto-merge (squash) October 3, 2025 17:23
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 3, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 3, 2025
@wxiaoguang wxiaoguang merged commit d94faf6 into go-gitea:release/v1.25 Oct 3, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants