Skip to content

feat(pr-merge): bypass audit-marker requirement on chore(deps) PRs#246

Merged
stevensacks merged 2 commits into
mainfrom
feat/chore-deps-skip-merge-hook
May 26, 2026
Merged

feat(pr-merge): bypass audit-marker requirement on chore(deps) PRs#246
stevensacks merged 2 commits into
mainfrom
feat/chore-deps-skip-merge-hook

Conversation

@stevensacks
Copy link
Copy Markdown
Contributor

Summary

Adds a chore(deps) bypass to the pr-merge-audit-check.sh hook so dep-bump PRs from /update-deps are turnkey to merge — no separate audit run required. Mirrors the same skip narrowing already applied to the three required CI workflows in #245.

Mechanism

gh pr view --json title --jq .title reads the current branch's PR title. If it matches ^chore\(deps(-dev)?\):, the hook exits 0 and the merge proceeds.

The bypass runs only after the three existing signals (local marker, GAIA-Audit trailer, GitHub commit status) have all missed — same pattern as the existing GitHub-status fallback. Any failure to query (no gh, no auth, no PR for the current branch, network error) falls through to the normal deny path. The bypass is opt-in proof, not a fallback that softens the gate.

Why this scope

The /update-deps wrapper runs the full quality gate (typecheck + lint + vitest + playwright + build) locally before pushing. That's equivalent evidence to a separate code-review-audit run. With the three required workflows already skipping on chore(deps):, requiring a local audit marker was the last barrier — this PR removes it.

Other chore: prefixes (chore: bump version, etc.) still require the marker. Pattern is anchored, exact prefix match.

Test plan

  • bash -n clean on the modified hook.
  • shellcheck clean on the modified hook (only pre-existing SC1091 info note remains).
  • Wiki-style audit clean on the PR Merge Workflow page.
  • After merge, the next /update-deps run produces a PR that merges without a separate audit step.

🤖 Generated with Claude Code

The pr-merge-audit-check hook denies `gh pr merge` until one of three
audit signals is present (local marker, GAIA-Audit trailer, GitHub
commit status). For chore(deps) PRs from the /update-deps wrapper,
the local quality gate (typecheck + lint + vitest + playwright +
build) is already the equivalent signal — requiring a separate audit
marker is redundant.

Add a fourth accepted signal: a `gh pr view` lookup of the PR title.
When it matches `^chore\(deps(-dev)?\):`, the bypass fires and the
merge is allowed.

Fall-through is deliberately restrictive: any failure to query the PR
title (no gh, no auth, no PR for the current branch, network error)
falls through to the normal deny path. The bypass is opt-in proof,
not a fallback that softens the gate when the network is unreliable.

This mirrors the same chore(deps) skip already applied to
code-review-audit.yml, tests.yml, and chromatic.yml — all four
surfaces release together on dep-bump PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

code-review-audit skipped: no audit-relevant files changed in this PR

@github-actions
Copy link
Copy Markdown
Contributor

code-review-audit skipped: no audit-relevant files changed in this PR

@stevensacks stevensacks merged commit 0c66fc5 into main May 26, 2026
6 checks passed
@stevensacks stevensacks deleted the feat/chore-deps-skip-merge-hook branch May 26, 2026 10:19
@stevensacks stevensacks mentioned this pull request May 26, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant