-
Notifications
You must be signed in to change notification settings - Fork 477
dispatch_workflow: support per-call ref override for runtime branch targeting
#49408
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
Changes from all commits
4c03622
e03cf11
27f6cb6
3df3b7b
addc45c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normalizeRefPatternsilently misroutes short tag patternsnormalizeRefPattern("tags/*")returns"refs/heads/tags/*"instead of"refs/tags/*", so anallowed-refsentry like["tags/*"]will never match a real tag ref after normalization.Note that
normalizeRefhas the same gap:normalizeRef("v1.2.3")→"refs/heads/v1.2.3", which also would not match a tag ref. This inconsistency means users writing short-form tag patterns inallowed-refsget silently wrong matching.Consider checking the
tags/prefix:At minimum, add a test that covers bare
tags/v*patterns inallowed-refsso the current behavior is explicit and not accidentally "fixed" later.@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest commit. Both
normalizeRefandnormalizeRefPatternnow check for thetags/prefix before defaulting torefs/heads/:A test case covering
tags/v*inallowed-refsand atags/v1.2.3message ref was added todispatch_workflow.test.cjs.