Skip to content

fix: fetch full git history in release workflow for git-cliff - #10

Closed
robdefeo wants to merge 1 commit into
mainfrom
fix/release-fetch-depth
Closed

fix: fetch full git history in release workflow for git-cliff#10
robdefeo wants to merge 1 commit into
mainfrom
fix/release-fetch-depth

Conversation

@robdefeo

Copy link
Copy Markdown
Owner

Summary

  • The plan job checkout used fetch-depth: 1 (shallow) and fetch-tags: false — git-cliff only saw the single release commit and no tags, producing empty changelog output
  • Adding fetch-depth: 0 and fetch-tags: true gives git-cliff the full history it needs

After merging

Delete the v0.1.0 tag/release and re-cut from updated main.

🤖 Generated with Claude Code

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-apps

greptile-apps Bot commented Apr 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes an empty changelog issue in the release workflow by giving git-cliff access to full git history and tags. The plan job previously used a shallow clone (fetch-depth: 1, no tags), so git-cliff could only see the single release commit and produced empty output. Adding fetch-depth: 0 and fetch-tags: true resolves this.

  • The fix is correctly scoped to the plan job only, which is the job that invokes dist host --steps=create / dist plan and drives changelog generation via git-cliff.
  • The other jobs (build-local-artifacts, build-global-artifacts, host, announce) perform builds and artifact uploads and do not need full history, so leaving them as shallow clones is appropriate and avoids unnecessary overhead.
  • The change is minimal, targeted, and directly addresses the described root cause.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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)
Loading

Reviews (1): Last reviewed commit: "fix: fetch full git history in release w..." | Re-trigger Greptile

@robdefeo

Copy link
Copy Markdown
Owner Author

Superseded by #11 — changelog-guard approach eliminates the need for full git history in CI.

@robdefeo robdefeo closed this Apr 22, 2026
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