Skip to content

feat: render a commit without a pull request next to the pull requests - #291

Merged
goldbarth merged 1 commit into
mainfrom
feat/direct-push-commits
Sep 30, 2026
Merged

goldbarth merged 1 commit into
mainfrom
feat/direct-push-commits

Conversation

@goldbarth

Copy link
Copy Markdown
Owner

Closes #257

  • Why: a commit that belongs to no merged pull request was left out whenever the release had one. A fix pushed straight to main shipped with the release and appeared nowhere, and nothing said so. The decision to render such commits, with its reasons, is recorded in Commits without a pull request are left out silently when a release has one #257.
  • A direct commit becomes a change of its own, as a release without pull requests already did: subject as title, no description, no labels. The same rules follow, so a chore: or ci: push is dropped as Internal, and labels.onlyIncludeLabeled drops it for having no labels.
  • Membership comes from PullRequestInfo.CommitShas, which the reader fills from the request per commit it already makes. No extra GitHub request. It is read from every merged pull request, not only the ones left after revert pairing, so the commits of a reverted pull request do not come back as direct pushes.
  • A merge commit without a pull request is skipped: what it brings in is the merged commits, which are in the range themselves. git log now reads the parents (%P), and CommitInfo.IsMerge carries it. A release without pull requests skips its merge commits too, instead of rendering "Merge branch ..." as Other.
  • Range order: a pull request stands where its first commit is, a direct commit where it is. A release of pull requests alone keeps exactly the order it had.
  • The run says what happened: the summary's Release: line adds 3 commits without one (1 merge commit, skipped) when there are any, and the run record's release gets commitsWithoutPullRequest and mergeCommitsSkipped. Both are new fields, so the run record stays at schema version 3. changelog.json is unchanged: commit-based changes are already part of it.
  • Docs: what-goes-into-a-release.md describes the behavior, including that a direct revert pairs nothing. run-metrics.md and run-record.md describe the new counts.

Reproduced and verified end to end, no network, no tokens: the built binary in a scratch repository: v0.1.0, then a pull request's commit on a branch, fix: crash on start pushed to main, a local --no-ff merge, v0.2.0. GitHub and the model are a local stub that knows the one pull request.

Before:  Release:  3 commits, 1 pull request, 1 fact (1 with a description, 12 characters)
After:   Release:  3 commits, 1 pull request, 2 commits without one (1 merge commit, skipped), 2 facts (1 with a description, 12 characters)

What the model received after the fix:

- [1] Feature: feat: add search - Adds search.
- [2] Fix: fix: crash on start

Tests: ReleaseChangeResolverTests (a direct commit next to a pull request in range order, merge skipped; a reverted pull request's commits stay out; a release without pull requests skips merges; DirectCommits counts skipped merges), GitCliCommitReaderTests (a real two-parent merge is IsMerge), RunReportFormatterTests and RunRecordJsonSerializerTests (the new counts). Test pull requests that stand next to commits now name their commits, as the reader does. Full suite 858 passing, build without warnings, dotnet format clean.

@goldbarth goldbarth self-assigned this Sep 30, 2026
@goldbarth
goldbarth merged commit b7f2458 into main Sep 30, 2026
4 checks passed
@goldbarth
goldbarth deleted the feat/direct-push-commits branch September 30, 2026 11:44
goldbarth added a commit that referenced this pull request Oct 7, 2026
Follows #344. Step 1 of `docs/development/releasing.md`.

- **Why now:** the launch points are merged, and the binary people
install is still `0.1.0-preview.3`, which has none of them. The
announcement needs a release that holds what the README and the docs on
`main` describe.
- **What ships since preview.3,** 63 commits:
- a first run: `chartula doctor` (#295, grouped in #341), `chartula
--version` (#286), a free `preview` (#292), progress while a run works
(#297, with a spinner and `--plain` in #340), a first tag from the first
commit with a confirmation for a large range (#282);
- what a release contains: commits without a pull request (#291), issue
numbers at every depth (#293), a sentence for a release with nothing for
developers (#307 in #333);
- checks and prompts: pull request text quoted and bounded (#338), no
false flag for a wrapped phrase or a fenced block (#336), flags set
apart from the entries (#331);
- publishing: the token checked before the first model call (#285), a
published release not replaced unless asked (#335);
- the files: `changelog.json` without descriptions and readable as text
(#294, #332).
- **Breaks to state in the notes,** as `docs/versioning.md` asks of a
preview:
- `changelog.json` is schema version 2: a change's `description` is gone
(#294). The run record is schema version 3 and holds the complete facts.
- `generate` stops on a tag whose release is already published;
`--replace-published` restores the old behaviour (#335).
- An option a command does not take stops the run (#301), and
`--whole-history` is gone (#282).
- The terminal output changed form (#340 to #342): the summary's first
line, audience headings in place of `--- Technical ---`, and `doctor`'s
last line. A script that reads those lines needs a look; exit codes and
the files are unchanged.
- The csproj `Version` is the single source; nothing else carries the
number.

**After merge:** tag the merge commit on `main` with `v0.1.0-preview.4`
and push it; `release.yml` builds the draft, `chartula generate --tag
v0.1.0-preview.4` writes the notes into it, and publishing runs
`install.yml`. The pinned `v0.1.0-preview.3` in `docs/ci.md` and
`docs/install.md`, and the template link in the `doctor` samples, move
to the new tag once the release exists, with the changelog pull request
of step 6.

**Verified:** the built CLI prints `chartula 0.1.0-preview.4+<commit>`.

Tests: no test changed. Full suite 1,010 passing, build without
warnings.
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.

Commits without a pull request are left out silently when a release has one

1 participant