Skip to content

Fix: Push branch before creating PR in update workflow#20

Merged
BenjaminMichaelis merged 2 commits intomainfrom
copilot/fix-action-failure-issue
Dec 28, 2025
Merged

Fix: Push branch before creating PR in update workflow#20
BenjaminMichaelis merged 2 commits intomainfrom
copilot/fix-action-failure-issue

Conversation

Copy link
Contributor

Copilot AI commented Dec 28, 2025

The update-trx-to-vsplaylist scheduled workflow fails when gh pr create is called before pushing the branch to remote.

Change: Added git push origin "$BRANCH_NAME" before gh pr create command.

git checkout -b "$BRANCH_NAME"
git add action.yml
git commit -m "chore: bump trx-to-vsplaylist to ${{ steps.get_version.outputs.latest }}"
git push origin "$BRANCH_NAME"  # Added
gh pr create -B ${{ github.event.repository.default_branch }} -H "$BRANCH_NAME" \
  --title "chore: bump trx-to-vsplaylist to ${{ steps.get_version.outputs.latest }}" \
  --body "Automated PR to update trx-to-vsplaylist tool version in action.yml to ${{ steps.get_version.outputs.latest }}"

The GitHub CLI requires the branch to exist remotely before creating a PR from it.

Original prompt

Reference: https://github.com/BenjaminMichaelis/trx-to-vsplaylist/actions/runs/20547766820/job/59020693406

What caused the failure and fix


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

Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix action failure in GitHub workflows Fix: Push branch before creating PR in update workflow Dec 28, 2025
@BenjaminMichaelis BenjaminMichaelis marked this pull request as ready for review December 28, 2025 06:29
Copilot AI review requested due to automatic review settings December 28, 2025 06:29
Copy link

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 fixes a workflow failure in the automated update-trx-to-vsplaylist scheduled workflow by ensuring the branch is pushed to remote before attempting to create a pull request.

  • Added git push origin "$BRANCH_NAME" command before gh pr create to push the local branch to remote
  • Resolves the issue where GitHub CLI requires the branch to exist remotely before creating a PR from it

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BenjaminMichaelis BenjaminMichaelis merged commit 35e63f7 into main Dec 28, 2025
11 checks passed
@BenjaminMichaelis BenjaminMichaelis deleted the copilot/fix-action-failure-issue branch December 28, 2025 06:31
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