-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
fix(webhook): prevent tag events from bypassing branch filters targets #35449 #35567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(webhook): prevent tag events from bypassing branch filters targets #35449 #35567
Conversation
Im working on adding integration tests for these to check both
|
I did some refactoring to use "git.RefName" type , to avoid abuses. Now, we have a new problem, see the FIXME |
Made some changes in b9484cf and added some tests: Now, branch name and full git ref are all supported. ![]() |
Yeah cool i was thinking something along the same lines ig Thanks i would love to contribute more. |
I think the current styles are right. Because ".form .help" has its own text color, intentionally we don't want much contrast here. |
It looks acceptable. The only other idea is to introduce a new color with a slightly less intense color. |
…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>
…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>
…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>
* giteaofficial/main: fix: auto-expand and auto-scroll for actions logs (go-gitea#35570) (go-gitea#35583) [skip ci] Updated translations via Crowdin [skip ci] Updated translations via Crowdin Fix creating pull request failure when the target branch name is the same as some tag (go-gitea#35552) Use bundled version of spectral (go-gitea#35573) Add rebase push display wrong comments bug (go-gitea#35560) Address some CodeQL security concerns (go-gitea#35572) fix(webhook): prevent tag events from bypassing branch filters targets go-gitea#35449 (go-gitea#35567) Added button to copy file name in PR files (go-gitea#35509) Update JS and PY deps (go-gitea#35565) Enable a few more tsconfig options (go-gitea#35553) Bump github.com/wneessen/go-mail from 0.6.2 to 0.7.1 (go-gitea#35557) add more routes to the "expensive" list (go-gitea#35547) Drop json-iterator dependency (go-gitea#35544) Add proper error message if session provider can not be created (go-gitea#35520) use experimental go json v2 library (go-gitea#35392) Use global lock instead of status pool for cron lock (go-gitea#35507) Move some functions to gitrepo package (go-gitea#35503) Move GetDiverging functions to gitrepo (go-gitea#35524) [skip ci] Updated translations via Crowdin
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
Closes #35449