Skip to content

fix(release): add fetch-depth: 0 to checkout to fix create-pull-request git fetch error#1496

Merged
ritzorama merged 1 commit intomasterfrom
copilot/fix-action-error-in-ci
May 6, 2026
Merged

fix(release): add fetch-depth: 0 to checkout to fix create-pull-request git fetch error#1496
ritzorama merged 1 commit intomasterfrom
copilot/fix-action-error-in-ci

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

Summary

Fixes the ##[error] annotation seen at step 7 line 86 of https://github.com/layer5io/sistent/actions/runs/25452067298/job/74671621380.

Root cause

peter-evans/create-pull-request@v8 internally runs:

git fetch --no-tags --progress --no-recurse-submodules --force --depth=1 \
  origin refs/heads/master:refs/heads/master

to rebase the new branch on top of the latest base. Because the preceding actions/checkout step checked out master as the working branch, git refuses the fetch with:

fatal: refusing to fetch into branch 'refs/heads/master' checked out at '/home/runner/work/sistent/sistent'

Fix

Add fetch-depth: 0 to the actions/checkout step. With a full (non-shallow) clone already present, create-pull-request detects that it already has all commits and skips its shallow-fetch of the base branch entirely, avoiding the conflict.

The continue-on-error: true guard on the PR step meant the publish workflow still reported success, but the version-bump PR may not have been reliably opened on every run.

Changes

  • .github/workflows/release.yml: add fetch-depth: 0 to the Checkout code step with an explanatory comment

…st git fetch error

Agent-Logs-Url: https://github.com/layer5io/sistent/sessions/4d091639-128b-4610-9983-d9d543060cf7

Co-authored-by: ritzorama <182301570+ritzorama@users.noreply.github.com>
@ritzorama ritzorama marked this pull request as ready for review May 6, 2026 18:05
Copilot AI review requested due to automatic review settings May 6, 2026 18:05
@ritzorama ritzorama merged commit 6ac49ab into master May 6, 2026
1 check passed
@ritzorama ritzorama deleted the copilot/fix-action-error-in-ci branch May 6, 2026 18:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release publishing workflow to ensure peter-evans/create-pull-request@v8 can open the post-publish “version bump-back” PR reliably by preventing the internal shallow git fetch that fails when the base branch is checked out.

Changes:

  • Configure actions/checkout with fetch-depth: 0 to provide a full clone for the workflow.
  • Add inline documentation explaining why the full clone prevents the create-pull-request fetch error.

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.

3 participants