-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
Milestone
Description
Description
Description
In Gitea 1.22.2, creating or deleting a tag emits a "push" webhook with ref
set to refs/tags/...
.
This behavior triggers CI jobs subscribed to branch push events, even though semantically it's a tag operation.
Expected Behavior
Tag creation/deletion should trigger only a create
or delete
event—not a push
event—so that pipelines can be scoped properly.
Actual Behavior
Gitea currently sends a push
webhook for both regular branch pushes and tag events, causing unintended execution in pipelines expecting only branch triggers.
Steps to Reproduce
- Configure a pipeline job with webhook:
- Trigger On: Push Event
- Branch filter:
refs/heads/main
- Create (or delete) a tag in Gitea.
- Observe that the pipeline is triggered anyway (because
ref
containsrefs/tags/...
, but the event type is stillpush
).
Proposal
- Add differentiation in webhook logic: a tag operation should optionally trigger only the
create
ordelete
webhook. - Or at minimum, support an optional configuration to exclude push events whose
ref
starts withrefs/tags/
.
This change would prevent branch-only pipelines from being inadvertently triggered by tag-related actions.
Gitea Version
1.22.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
2.49.0
Operating System
Windows
How are you running Gitea?
Windows Service
Database
None