Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

Addresses feedback from PR #794 where the workflow would fail when no package updates are available. The commit step exits successfully when git diff --cached --quiet is true, but the PR creation step still runs with if: success() and fails due to the missing remote branch.

Changes:

  • Add step output has-changes to propagate change detection state
  • Set has-changes=false when no staged changes detected, has-changes=true after successful push
  • Gate PR creation on steps.commit.outputs.has-changes == 'true' instead of success()
- name: Create branch, commit, push
  id: commit
  run: |
    if (git diff --cached --quiet) {
      echo "has-changes=false" >> $env:GITHUB_OUTPUT
      exit 0
    }
    git commit -m "..."
    git push ...
    echo "has-changes=true" >> $env:GITHUB_OUTPUT

- name: Open PR with gh
  if: steps.commit.outputs.has-changes == 'true'

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com>
Copilot AI changed the title [WIP] Update GitHub Actions workflow for package updates Gate PR creation on commit detection in package-update workflow Feb 7, 2026
Copilot AI requested a review from neilr81 February 7, 2026 14:25
@neilr81 neilr81 marked this pull request as ready for review February 7, 2026 14:28
@neilr81 neilr81 requested a review from a team as a code owner February 7, 2026 14:28
@neilr81 neilr81 merged commit 1c56edc into bugfix/add-pu Feb 7, 2026
1 check passed
@neilr81 neilr81 deleted the copilot/sub-pr-794 branch February 7, 2026 14:28
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