Skip to content

docs-deploy: Collapse three glob matchers into one#231

Open
reakaleek wants to merge 1 commit into
mainfrom
audit/docs-deploy-one-glob-matcher
Open

docs-deploy: Collapse three glob matchers into one#231
reakaleek wants to merge 1 commit into
mainfrom
audit/docs-deploy-one-glob-matcher

Conversation

@reakaleek

Copy link
Copy Markdown
Member

What

Replace the three hand-rolled matchers in docs-deploy.yml's context script (matchesPattern, isIgnored, and an inner matchesGlob) with one hoisted matchesGlob.

Why

Repo-wide over-engineering audit. All three implemented the same dir/** / dir/* / exact semantics; matchesPattern additionally fails open for other pattern shapes. Triplication, not necessity — this workflow runs on workflow_run with no checkout, so string matching against API filenames is the right tool, once.

How

One matchesGlob at the top; isIgnored becomes ignoreLines.some(...); matchesPattern keeps its documented fail-open behavior for non-/** patterns. Behavior is byte-for-byte identical.

Test plan

Node self-check comparing old and new semantics across /**, /*, exact, **, empty, and fail-open cases — all pass. actionlint passes.

🤖 Generated with Claude Code

The context script defined matchesGlob inline in the vale-paths block,
a bespoke isIgnored with identical semantics, and a matchesPattern
whose only real case was the /** suffix. Hoist one matchesGlob and
express the other two through it, preserving matchesPattern's
fail-open behavior for non-/** shapes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@reakaleek reakaleek requested a review from a team as a code owner July 14, 2026 09:02
@reakaleek reakaleek requested a review from cotti July 14, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant