Skip to content

auto-merge sync PRs from dev #4775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ralfhandl
Copy link
Contributor

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.

  • 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

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.

1 participant