Skip to content

chore!: clean up the repository for v2 and release on every merge - #10

Merged
oscar-alma merged 9 commits into
mainfrom
chore/v2-cleanup
Oct 29, 2026
Merged

oscar-alma merged 9 commits into
mainfrom
chore/v2-cleanup

Conversation

@oscar-alma

@oscar-alma oscar-alma commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Moves the uv-lock-script hook here from alma/actions#269 (DEX-1156). This repository is public, so any
repository can use its hooks without credentials.

Changes

  • Cleanup: remove check-file-change and check-comments (no users in the org) and the Python packaging.
  • uv-lock-script: imported from alma/actions#269. Tested with bats, offline.
  • check-branch-name: removed. Replace it with a GitHub "Restrict branch names" ruleset; DEX-2659 tracks
    migrating its 10 users.
  • CI: Aqua is replaced by Wiz (SEC-815). PRs now run shellcheck, zizmor and the hook tests on GitHub-hosted runners.
  • Releases: every merged PR publishes an immutable vX.Y.Z release. The bump comes from exactly one required
    label: release:major, release:minor, release:patch or norelease. There's no floating major tag, because
    pre-commit caches each rev forever.
  • Docs: README (usage, a section per hook, upgrading from 1.x) and CONTRIBUTING (adding a hook, testing,
    releasing, what counts as breaking), written for outside contributors.
  • Renovate: extends the Alma defaults, and labels its PRs norelease.

🤖 Generated with Claude Code

- Remove the unused check-file-change and check-comments hooks and the Python packaging
- Move check-branch-name to hooks/, unchanged, and test it with bats
- Replace the Aqua scanner, now handled by Wiz, with CI running shellcheck, zizmor and the hook tests
- Publish a vX.Y.Z release on every merged PR, bumped by its required release label
- Document usage in README.md and contributing in CONTRIBUTING.md
- Keep dependencies up to date with Renovate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oscar-alma oscar-alma added the release:major Breaking change: publishes a new major version label Oct 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oscar-alma
oscar-alma requested a review from a team October 29, 2026 10:28
- Print a deprecation notice from the hook, and mark it deprecated in its name and in the README
- Point to a "Restrict branch names" ruleset rule as the replacement
- Simplify README.md and CONTRIBUTING.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread hooks/check-branch-name.sh Resolved
Comment thread .github/renovate.json5 Resolved
oscar-alma and others added 5 commits October 29, 2026 12:23
- Add uv-lock-script from alma/actions#269 (DEX-1156): keeps the lock files of PEP 723 scripts up to date, and
  fails while a lock file isn't tracked by git
- Remove check-branch-name: use a GitHub "Restrict branch names" ruleset instead (DEX-2659)
- Run CI on ubuntu-26.04 and move the Renovate config to .github/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matching lock files only covered lock-only changes, which CI
(--all-files) and `uv run --locked` already catch. Also document
that a lock file not added to git fails the hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An up-to-date lock is checked offline and never upgraded, so running
the hook on --all-files doesn't touch main or CI. Also fix write_script,
which wrote an unquoted dependency: the "can't be locked" tests failed
on a TOML error instead of the offline resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starting one grep per file made --all-files take 3.7 s on a
7,043-file repository. A single grep -l brings it to 0.5 s.
Add BENCHMARKS.md with the hook's benchmark and how to run it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A separate benchmark file nobody can rerun would go stale. Keep only
the result, where consumers choose the hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@remi-zuffinetti remi-zuffinetti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL, bats.

As a follow-up, you may want to install it (and maybe prek?) with mise and a lockfile, so that we do not depend on a new 3rd-party Github Action. But this is not a requirement.

Replace bats-action, setup-uv and prek-action with mise-action, already
used across the org, and pin the tools with their checksums in
mise.lock. Contributors get the same versions with `mise install`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oscar-alma
oscar-alma merged commit 07cf858 into main Oct 29, 2026
3 checks passed
@oscar-alma
oscar-alma deleted the chore/v2-cleanup branch October 29, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:major Breaking change: publishes a new major version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants