Skip to content

feat(hooks): allow renovate branches in the no-commit-to-branch guard - #1435

Merged
c-vigo merged 2 commits into
devfrom
feature/1433-renovate-branch-guard
Aug 12, 2026
Merged

c-vigo merged 2 commits into
devfrom
feature/1433-renovate-branch-guard

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a (?!^renovate/.+$) allowance clause to the default no-commit-to-branch pattern in branchNamePatternFor (nix/hooks.nix — the one definition), regenerating both committed YAML artifacts in lockstep. The Renovate app commits server-side where hooks never run, but maintainer fix-up commits on renovate/* branches (changelog conflict merges, dist/ rebuilds during batch weeks) were blocked, forcing the commit-on-a-compliant-branch-then-git push HEAD:renovate/… workaround. Renovate names carry no issue number and use a charset outside the slug rule (live: renovate/github-actions-(minor-and-patch)), so this is a dedicated namespace clause next to worktree/<n>, not a #1432 knob value.

Changes

  • nix/hooks.nix: clause in the base pattern string (gitflow AND trunk variants), header comment extended with the rationale
  • .pre-commit-config.yaml + assets/workspace/.pre-commit-config.yaml: pattern + convention comment regenerated (drift-gated)
  • tests/test_flake_hooks.py: TestRenovateBranchAllowance — regex semantics on the portable render (allowed: real Renovate names; blocked: renovated/x prefix confusion, non-compliant names) + clause presence on the gitflow and trunk consumer surfaces
  • CHANGELOG.md (+ hook-synced mirror): Unreleased/Changed entry

Test evidence

  • TDD: new test class failed against the old pattern (renovate/lock-file-maintenance must be allowed), passes after the change
  • tests/test_flake_hooks.py: 39 passed (incl. the portable-render drift gate over both YAMLs)
  • just precommit fully green (sync-manifest changelog-mirror rewrite staged and converged)

Refs: #1433

@c-vigo
c-vigo merged commit ae8baad into dev Aug 12, 2026
14 checks passed
@c-vigo
c-vigo deleted the feature/1433-renovate-branch-guard branch August 12, 2026 05:53
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