fix: fetch full git history in release workflow for git-cliff - #10
fix: fetch full git history in release workflow for git-cliff#10robdefeo wants to merge 1 commit into
Conversation
The plan job used fetch-depth: 1 (shallow clone) with fetch-tags: false. git-cliff needs full history and all tags to generate changelog entries. Without them it sees only the release commit and produces empty output.
Greptile SummaryThis PR fixes an empty changelog issue in the release workflow by giving git-cliff access to full git history and tags. The
Confidence Score: 5/5Safe to merge — the fix is minimal, correct, and scoped precisely to the job that needs full git history. Two-line addition of well-understood actions/checkout parameters (fetch-depth: 0, fetch-tags: true) applied only to the job that requires them. No logic changes, no new dependencies, and the root cause matches the fix exactly. No files require special attention.
|
| Filename | Overview |
|---|---|
| .github/workflows/release.yml | Added fetch-depth: 0 and fetch-tags: true to the plan job's checkout step so git-cliff has full history and tags to generate changelog output. |
Sequence Diagram
sequenceDiagram
participant GH as GitHub (tag push)
participant plan as plan job
participant build as build-local/global-artifacts
participant host as host job
participant announce as announce job
GH->>plan: trigger on version tag
Note over plan: checkout (fetch-depth: 0,<br/>fetch-tags: true) FIXED
plan->>plan: dist host --steps=create (git-cliff reads full history & tags)
plan-->>build: manifest (artifacts_matrix)
build->>build: checkout (shallow, no tags needed)
build->>build: dist build
build-->>host: artifacts
host->>host: checkout (shallow)
host->>host: dist host --steps=upload,release
host->>GH: GitHub Release created
host-->>announce: manifest
announce->>announce: checkout (shallow)
Reviews (1): Last reviewed commit: "fix: fetch full git history in release w..." | Re-trigger Greptile
|
Superseded by #11 — changelog-guard approach eliminates the need for full git history in CI. |
Summary
fetch-depth: 1(shallow) andfetch-tags: false— git-cliff only saw the single release commit and no tags, producing empty changelog outputfetch-depth: 0andfetch-tags: truegives git-cliff the full history it needsAfter merging
Delete the v0.1.0 tag/release and re-cut from updated
main.🤖 Generated with Claude Code