Skip to content

Commit 6c0b5e9

Browse files
authored
feat: add --resume, lazy imports and unit tests for the remaining modules (#13)
* feat: append CommitRocket attribution to commit messages Commits now end with "Prepared and Committed By: 🚀 CommitRocket (<repo>)", never duplicated. Add --no-attribution (alias --ignore-attribution, or no-attribution in the config file) to skip it. Applies to batch, LFS-rules and resumed commits, and to the dry-run preview and JSON report. * refactor: split the package into core, git, io, support and cli Group the modules into packages and split the runner and the command line into small modules, with lazy imports throughout. Tests move to tests/unit, mirroring the source tree. The io/ notification scripts become files. Fix run_git decoding Git output with the system code page, which garbled non-ASCII file names and commit messages on Windows. * chore: align repository files with BatchVault Add .gitattributes, markdownlint and Sweepito config and SUPPORT.md, update the issue config and pull request template, add build provenance to the release workflow and a mypy step to lint. Move the social preview image to brand/. * docs: add guides, trim the README and release 0.1.3 Add docs/README.md and the command line and configuration guides, update the architecture and development docs, move reference detail out of the README, add mypy and bump the version to 0.1.3. * feat: add --resume backed by a .git run journal The run journal is now .git/commitrocket-journal.jsonl, an append-only event log holding every run parameter plus progress (staged, committed, pushed). It lives in .git so it is never tracked. --resume reuses the stored parameters; explicitly passed values must match or the command errors. A plain re-run continues the run when parameters match and starts a new run when they differ. Missing, damaged or incompatible journals, a different branch/target and a changed history give clear errors. The journal is deleted when a run finishes. * refactor: import lazily in git, io and support modules Move pathlib, json, os and sibling-module imports into the functions that use them, so importing a module loads only what it needs. * test: add unit tests for the remaining modules Cover the cli, core/runner, git/push, io/ui and support/errors modules, merge the push tests into one file and run pytest with importlib import mode so test files in different folders can share a name. * docs: document --resume in the guides and refresh the architecture notes
1 parent 151afb7 commit 6c0b5e9

96 files changed

Lines changed: 5287 additions & 2001 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
* text=auto eol=lf
2+
3+
*.sh text eol=lf
4+
*.bat text eol=crlf
5+
*.ps1 text eol=lf
6+
7+
*.png binary
8+
*.jpg binary
9+
*.jpeg binary
10+
*.gif binary
11+
*.ico binary
12+
*.pdf binary

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ contact_links:
33
- name: Report a security vulnerability
44
url: https://github.com/coldsofttech/CommitRocket/security/advisories/new
55
about: Please report security problems privately, not in a public issue.
6-
- name: Questions and ideas
7-
url: https://github.com/coldsofttech/CommitRocket/discussions
8-
about: Ask a question or float an idea before opening an issue.
6+
- name: Questions and support
7+
url: https://github.com/coldsofttech/CommitRocket/blob/main/SUPPORT.md
8+
about: See how to get help before opening an issue.

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
## What does this change?
1+
## What changed
22

3-
<!-- A short summary, and why it is needed. Link the issue it closes, e.g. "Closes #123". -->
4-
5-
## How was it tested?
6-
7-
<!-- Commands you ran and anything you checked by hand. -->
3+
<!-- What does this do, and why? Link the issue it closes, e.g. "Closes #123". -->
84

95
## Checklist
106

11-
- [ ] `uv run ruff check .` passes
12-
- [ ] `uv run pytest -m "not integration"` passes
7+
- [ ] Tests added or updated
8+
- [ ] `uv run ruff check .` and `uv run pytest -m "not integration"` pass
139
- [ ] `uv run pytest -m integration` passes (if the change touches the run flow, Git handling or LFS)
14-
- [ ] Tests added or updated for the change
15-
- [ ] `CHANGELOG.md` has a short entry under `[Unreleased]` (what changed for the reader, in one or two lines)
16-
- [ ] `README.md` updated if user-facing behavior or options changed; technical details go in `docs/`
10+
- [ ] `CHANGELOG.md` has a short `[Unreleased]` entry
11+
- [ ] README or `docs/` updated if behaviour changed
1712
- [ ] No secrets, tokens or private paths in the code, tests or logs

‎.github/social-preview.html‎

Lines changed: 0 additions & 35 deletions
This file was deleted.

‎.github/workflows/lint.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ jobs:
2525

2626
- name: Ruff
2727
run: uv run ruff check .
28+
29+
- name: Mypy
30+
run: uv run mypy

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
permissions:
5252
contents: write
5353
id-token: write
54+
attestations: write
5455
steps:
5556
- uses: actions/checkout@v7
5657

@@ -59,6 +60,11 @@ jobs:
5960
- name: Build
6061
run: uv build
6162

63+
- name: Attest build provenance
64+
uses: actions/attest-build-provenance@v4
65+
with:
66+
subject-path: dist/*
67+
6268
- name: Publish to PyPI
6369
run: uv publish --trusted-publishing always
6470

‎.markdownlint-cli2.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config:
2+
MD013: false # line length
3+
MD033: false # inline HTML
4+
MD041: false # first line heading (templates start with a subheading)

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## [0.1.3] - 2026-11-14
6+
7+
### Added
8+
- `--resume` continues an interrupted run with the settings it started with. Running again with different settings starts a new run.
9+
- An interrupted run is remembered in a file inside `.git` and removed when the run finishes.
10+
- Commits now end with a `Prepared and Committed By: 🚀 CommitRocket (...)` attribution line, never added twice.
11+
- `--no-attribution` (alias `--ignore-attribution`, or `no-attribution = true` in the config file) skips it.
12+
513
## [0.1.2] - 2026-10-25
614

715
### Changed

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ By taking part you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md).
99
- Use the issue templates. For a bug, include the exact command, the output, your
1010
versions (`commitrocket --version`, `commitrocket doctor`), and the relevant lines from
1111
the log file (re-run with `--level DEBUG`). Remove secrets and private paths.
12+
- **Questions:** see [SUPPORT.md](SUPPORT.md) for where to ask.
1213
- **Security problems:** do not open an issue. Follow the [Security Policy](SECURITY.md).
1314

1415
## Setting up

0 commit comments

Comments
 (0)