Skip to content

fix(release): use create-pull-request to satisfy main branch protection#45

Merged
chefgs merged 2 commits intomainfrom
copilot/fix-release-yml-failure
Mar 17, 2026
Merged

fix(release): use create-pull-request to satisfy main branch protection#45
chefgs merged 2 commits intomainfrom
copilot/fix-release-yml-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

release.yml was pushing version-bump commits directly to main, which is blocked by two branch protection rules: required verified signatures and required PR review.

Changes

  • Replace direct push with peter-evans/create-pull-request@v7 — commits created via the GitHub API are automatically verified (signed), and changes land via PR instead of a force push to main
  • Tag the PR branch HEAD — use steps.cpr.outputs.pull-request-head-sha so the version tag points to the commit carrying the actual file changes, not the pre-bump main HEAD
  • Prevent infinite loops on PR merge — extend the if guard to skip runs where the triggering push is the merge of an automated release PR:
    !(startsWith(github.event.head_commit.message, 'Merge pull request') &&
      contains(github.event.head_commit.message, 'release/v'))
  • Add pull-requests: write permission — required to open the version-bump PR

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

… policy

Co-authored-by: chefgs <7605658+chefgs@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix release.yml failure due to main branch protection policy fix(release): use create-pull-request to satisfy main branch protection Mar 17, 2026
Copilot AI requested a review from chefgs March 17, 2026 20:07
@chefgs chefgs marked this pull request as ready for review March 17, 2026 20:08
@chefgs chefgs merged commit ae1fecb into main Mar 17, 2026
8 checks passed
@chefgs chefgs deleted the copilot/fix-release-yml-failure branch March 21, 2026 15:09
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