Skip to content

fix(changelog): Include commits without a previous tag - #886

Merged
BYK merged 1 commit into
masterfrom
fix/first-release-changelog
Oct 1, 2026
Merged

BYK merged 1 commit into
masterfrom
fix/first-release-changelog

Conversation

@BYK

@BYK BYK commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Problem

A new release namespace can have no prior matching tag. In that case getChangesSince() passes to: HEAD without from: to simple-git, which returns an empty list. Craft then produces an empty auto changelog and does not stage a changelog file. This happened on Toolkits first cli@0.46.0 release.

Fix

Log all commits through the requested revision when there is no previous tag; retain the existing range-based behavior when there is one. A real local Git repository regression proves the empty-tag failure, tagged range, and explicit end revision.

Validation

  • Focused Vitest: 27 passed; regression failed before the fix
  • Typecheck passed
  • Lint passed with existing warnings
  • Prettier check passed
  • Full Vitest: 62 files, 1,222 passed, 1 skipped

Co-Authored-By: GPT-6 Sol <noreply@openai.com>
@BYK
BYK merged commit 94a7332 into master Oct 1, 2026
23 checks passed
@BYK
BYK deleted the fix/first-release-changelog branch October 1, 2026 21:25
nsdeschenes added a commit to nsdeschenes/shop-things that referenced this pull request Oct 2, 2026
## Summary

Fix first-release preparation with `auto` by upgrading Craft to 2.33.1,
and add Craft's changelog preview for pull requests. Craft 2.31.1 turns
a missing previous tag into `HEAD..HEAD`, so it reports no commits
despite a complete checkout. The upstream fix landed in [Craft
#886](getsentry/craft#886).

```diff
- Craft 2.31.1 (prepare, publish, minimum version)
+ Craft 2.33.1 (prepare, publish, minimum version)
+ Changelog preview reusable workflow and binary pinned to 2.33.1
```

The preview updates a PR comment on opening, new commits, reopening,
title/body edits, and label changes. It uses Craft's documented
`pull_request_target` integration so fork PRs can receive comments; the
upstream workflow reads PR metadata and configuration without executing
PR code.

## Evidence

- **Before:** The [failed Prepare release
run](https://github.com/nsdeschenes/shop-things/actions/runs/37063438205/job/111025318731)
reports no commits. A local harness exercising Craft's actual history
reader returns 0 commits with 2.31.1.
- **After:** The same harness returns all 32 commits with 2.33.1. Local
auto-version selection chooses `0.1.0`; full preparation remains
unverified because the dry run timed out.
- Preview workflow YAML parses successfully; its inputs and permissions
match the pinned upstream reusable workflow. The preview's GitHub
execution can be verified after this workflow reaches `main`.
- `git diff --check` and the applicable commit hook passed.

## Merge Danger

**Door:** two-way

The version pins and preview workflow can be reverted.

**Blast Radius:** automation

Both preparation and publication use the upgraded Craft binary. The
preview has permission to write PR comments and commit statuses. No
application code changes.

---------

Co-authored-by: Codex <noreply@openai.com>

This branch was successfully deployed

1 active deployment
false — 8c791c9a Deployed Oct 1, 2026 by BYK via Build #2948
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