Skip to content

workflows: add trunk auto-merge support for release-25.4 backport PRs#162003

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rishabh7m:trunk-auto-merge
Jan 29, 2026
Merged

workflows: add trunk auto-merge support for release-25.4 backport PRs#162003
craig[bot] merged 1 commit intocockroachdb:masterfrom
rishabh7m:trunk-auto-merge

Conversation

@rishabh7m
Copy link
Contributor

Previously, the auto-merge workflow merged all qualifying backport PRs directly using the GitHub merge API, regardless of their target branch.

This was inadequate because the release-25.4 branch requires the trunk merge process (triggered via /trunk merge comment) instead of direct merging, while other release branches still need direct merging.

To address this, this patch adds baseRefName to the GraphQL query to identify each PR's target branch, and implements conditional logic that adds a /trunk merge comment for PRs targeting release-25.4 while continuing to directly merge PRs targeting all other branches. The logging was also enhanced to include the target branch for better visibility.

Testing

  • Created a trimmed down version of auto-merge-backport.yml where it only logs and adds the /trunk merge comment
  • Test PR
  • Test Run
image

Release notes: None

Epic: CODESYS-206

Previously, the auto-merge workflow merged all qualifying backport PRs
directly using the GitHub merge API, regardless of their target branch.

This was inadequate because the release-25.4 branch requires the trunk
merge process (triggered via /trunk merge comment) instead of direct
merging, while other release branches still need direct merging.

To address this, this patch adds baseRefName to the GraphQL query to
identify each PR's target branch, and implements conditional logic that
adds a /trunk merge comment for PRs targeting release-25.4 while
continuing to directly merge PRs targeting all other branches. The
logging was also enhanced to include the target branch for better
visibility.

Release notes: None

Epic: CODESYS-206
@rishabh7m rishabh7m requested a review from a team as a code owner January 29, 2026 12:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rishabh7m
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 29, 2026

@craig craig bot merged commit 41b3953 into cockroachdb:master Jan 29, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants