fix(webhook): prevent tag events from bypassing branch filters targets (#35567) (#35577)

Backport #35567 by Exgene

Co-authored-by: Kausthubh J Rao <105716675+Exgene@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Giteabot
2025-10-04 01:49:16 +08:00
committed by GitHub
parent 6c8879b832
commit d94faf6d7e
7 changed files with 83 additions and 34 deletions

View File

@@ -44,7 +44,16 @@
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.branch_filter"}}</label>
<input name="branch_filter" type="text" value="{{or .Webhook.BranchFilter "*"}}">
<span class="help">{{ctx.Locale.Tr "repo.settings.branch_filter_desc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}</span>
<span class="help">
{{ctx.Locale.Tr "repo.settings.branch_filter_desc_1"}}
{{ctx.Locale.Tr "repo.settings.branch_filter_desc_2"}}
{{ctx.Locale.Tr "repo.settings.branch_filter_desc_doc" "https://pkg.go.dev/github.com/gobwas/glob#Compile" "github.com/gobwas/glob"}}
<ul>
<li><code>main</code></li>
<li><code>{main,feature/*}</code></li>
<li><code>{refs/heads/feature/*,refs/tags/release/*}</code></li>
</ul>
</span>
</div>
<div class="field">