Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/generate-release-pr-body/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
PRIOR_REF: ${{ inputs.prior_ref }}
TEMPLATE_FILE: "${{ github.action_path }}/pr_body_template.txt"
run: |
git fetch origin --tags
git fetch origin "$HEAD_REF" "$PRIOR_REF"
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The git fetch command is attempting to fetch $HEAD_REF and $PRIOR_REF as if they were branches or tags, but $HEAD_REF is a commit SHA (from git rev-parse HEAD). Git fetch expects refspecs, not arbitrary commit SHAs. This will likely fail with an error like "fatal: couldn't find remote ref [SHA]".

If the goal is to ensure these commits are available locally, they should already be present since HEAD_REF is the current commit and PRIOR_REF appears to be a tag reference. If you need to fetch tags, consider using git fetch origin --tags or fetch specific tags like git fetch origin "refs/tags/$PRIOR_REF" if $PRIOR_REF contains a tag name.

Suggested change
git fetch origin "$HEAD_REF" "$PRIOR_REF"
git fetch origin "refs/tags/$PRIOR_REF"

Copilot uses AI. Check for mistakes.

{
sed -e "s/{{VERSION}}/${VERSION}/g" \
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ jobs:

just prepare-release $VERSION
BRANCH_NAME=$(git branch --show-current)
HEAD_REF=$(git rev-parse HEAD)
echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV
echo "head_ref=$HEAD_REF" >> $GITHUB_ENV
echo "Branch: $BRANCH_NAME"

- name: push release branch
Expand All @@ -69,7 +71,7 @@ jobs:
uses: ./.github/actions/generate-release-pr-body
with:
version: ${{ env.version }}
head_ref: ${{ github.event.pull_request.head.sha || github.sha }}
head_ref: ${{ env.head_ref }}
prior_ref: ${{ env.prior_ref }}

- name: Create Pull Request
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge-release-pr-on-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
env:
BRANCH: ${{ steps.version.outputs.branch }}
run: |
git fetch origin
git fetch origin "$BRANCH"

BRANCH_SHA=$(git rev-parse "origin/$BRANCH")
echo "branch_sha=$BRANCH_SHA" >> $GITHUB_OUTPUT
Expand Down