fix(webhook): prevent tag events from bypassing branch filters targets #35449 (#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 #35449

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Kausthubh J Rao
2025-10-03 12:21:57 +05:30
committed by GitHub
parent efc48c36ff
commit c4532101a4
7 changed files with 83 additions and 34 deletions

View File

@@ -218,11 +218,16 @@ textarea:focus,
.form .help {
color: var(--color-secondary-dark-5);
margin-top: 0.25em;
padding-bottom: 0.6em;
display: inline-block;
text-wrap: balance;
}
.form .help code {
color: var(--color-text-light-1);
}
.m-captcha-style {
width: 100%;
height: 5em;