Skip to content

Conversation

ralfhandl
Copy link
Contributor

@ralfhandl ralfhandl commented Jul 10, 2025

Automatically merge sync PRs from dev to vX.Y-dev.

After creating a sync PR the PR is merged with "admin" privileges, which works because the bot creating the sync PR is allowed to bypass the ruleset requiring PR approvals.

The bot is not allowed to bypass the branch protection rule that requires status checks, so the merge SHOULD only succeed if the status checks pass. (Now is a good time to try this out because the sync PRs currently violate a status check that should not be bypassed 😎.)

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

@ralfhandl ralfhandl requested review from a team as code owners July 10, 2025 21:21
Copy link

@Copilot 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 enhances the workflow to automatically merge housekeeping PRs from dev into vX.Y-dev by capturing the created PR ID and invoking a merge step.

  • Capture the PR reference in a variable for subsequent operations
  • Add a merge step using admin privileges
Comments suppressed due to low confidence (2)

.github/workflows/sync-dev-to-vX.Y-dev.yaml:45

  • Capture only the numeric PR ID instead of the full output; for example:
PR=$(gh pr create --base "$BASE" --head "$HEAD" --label "Housekeeping" \
  --title "${BASE}: update from ${HEAD}" --body "Merge \`${HEAD}\` into \`${BASE}\`." \
  --json number -q .number)
            PR=$(gh pr create --base $BASE --head $HEAD \

.github/workflows/sync-dev-to-vX.Y-dev.yaml:49

  • The --admin flag bypasses branch protection, potentially ignoring required status checks; remove it if you want merges to wait for passing checks or confirm its behavior against your protection rules.
            gh pr merge $PR --merge --admin

@ralfhandl ralfhandl added the script Pull requests that update Bash or JavaScript code label Jul 16, 2025
@handrews handrews merged commit 139c3e5 into OAI:main Aug 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

script Pull requests that update Bash or JavaScript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants