Skip to content

Conversation

Copy link

Copilot AI commented Jan 27, 2026

The create-release.yml workflow was using peter-evans/create-pull-request@v6 after manually creating, committing, and pushing a branch. This action expects to handle the entire commit/push/PR lifecycle itself, not work with pre-pushed branches.

Changes:

  • Replaced create-pull-request action with gh pr create CLI command
  • Extracted PR body into a bash variable to handle multi-line strings cleanly

Before:

- name: Create release branch
  run: |
    git checkout -b $BRANCH_NAME
    git commit -am "chore: Bump version to ${{ env.new_version }}"
    git push origin $BRANCH_NAME

- name: Create Pull Request
  uses: peter-evans/create-pull-request@v6
  with:
    branch: release/${{ env.new_version }}
    # ... attempts to work with already-pushed branch

After:

- name: Create release branch
  run: |
    git checkout -b $BRANCH_NAME
    git commit -am "chore: Bump version to ${{ env.new_version }}"
    git push origin $BRANCH_NAME

- name: Create Pull Request
  run: |
    gh pr create \
      --base main \
      --head release/${{ env.new_version }} \
      --body "$PR_BODY"

This aligns with the standard pattern: when manually managing branch creation and pushing, use gh pr create or the REST API rather than workflow actions designed for the full lifecycle.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 27, 2026 14:35
Co-authored-by: mkistler <800728+mkistler@users.noreply.github.com>
Co-authored-by: mkistler <800728+mkistler@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback on revised release and publish workflows Replace create-pull-request action with gh CLI in release workflow Jan 27, 2026
Copilot AI requested a review from mkistler January 27, 2026 14:40
@mkistler
Copy link
Contributor

I'm going to start over on this.

@mkistler mkistler closed this Jan 28, 2026
@mkistler mkistler deleted the copilot/sub-pr-73-again branch January 28, 2026 17:43
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.

2 participants