Skip to content

ci: fix sync job failing when release-candidate has no branch protection rules#82

Merged
ToonCasteele merged 2 commits into
mainfrom
copilot/fix-sync-github-actions-job
Jul 17, 2026
Merged

ci: fix sync job failing when release-candidate has no branch protection rules#82
ToonCasteele merged 2 commits into
mainfrom
copilot/fix-sync-github-actions-job

Conversation

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

gh pr merge --auto --merge requires branch protection rules on the target branch. Since release-candidate has none, every run of the "Promote main to release candidate" workflow was failing with Pull request Protected branch rules not configured for this branch (enablePullRequestAutoMerge).

Changes

  • .github/workflows/promote-main-to-release-candidate.yml: wrap the auto-merge call in a fallback — attempt --auto --merge first; if it fails (no branch protection), fall back to a direct --merge.
if ! gh pr merge "$PR_NUMBER" --auto --merge 2>/dev/null; then
  # Auto-merge requires branch protection rules; fall back to direct merge
  gh pr merge "$PR_NUMBER" --merge
fi

The conflict-detection and Copilot conflict-resolution paths are unchanged.

Target branch

  • This PR creates, updates, or deletes Dataverse data and targets release-candidate.
  • This PR is read-only and targets main.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job sync ci: fix sync job failing when release-candidate has no branch protection rules Jul 17, 2026
Copilot AI requested a review from ToonCasteele July 17, 2026 11:41
@ToonCasteele
ToonCasteele marked this pull request as ready for review July 17, 2026 11:43
@ToonCasteele
ToonCasteele merged commit 3157b75 into main Jul 17, 2026
1 check passed
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