Skip to content

TT-16066 enabled automerge on PRs#111

Open
sredxny wants to merge 1 commit intomainfrom
TT-16066-enable-automerge-on-release-bot
Open

TT-16066 enabled automerge on PRs#111
sredxny wants to merge 1 commit intomainfrom
TT-16066-enable-automerge-on-release-bot

Conversation

@sredxny
Copy link
Copy Markdown
Contributor

@sredxny sredxny commented Apr 16, 2026

For this to work we need to audit the consumers repos and check that each repo have "Allow auto-merge" enabled in its Settings → General

@probelabs
Copy link
Copy Markdown

probelabs Bot commented Apr 16, 2026

This pull request updates the release-bot.yaml GitHub workflow to automatically enable auto-merge on the cherry-pick PRs it creates. This change aims to streamline the release process by allowing PRs without conflicts to merge automatically once all status checks pass.

Files Changed Analysis

  • .github/workflows/release-bot.yaml: Modified to include a new step that uses the GitHub CLI (gh) to set the auto-merge option on the newly created PR. This step is conditional and only runs if the cherry-pick operation was successful (MERGE_FAILED is 0).

Architecture & Impact Assessment

  • What this PR accomplishes: It automates the merging of clean (conflict-free) release PRs, reducing manual intervention and speeding up the release cycle.
  • Key technical changes introduced: A new if block is added to the workflow that executes gh pr merge --auto --merge. The || true ensures the workflow doesn't fail if auto-merge cannot be enabled (e.g., disabled in repository settings).
  • Affected system components: The primary component affected is the automated release process governed by the release-bot.yaml workflow. This has a downstream impact on all repositories that utilize this workflow, as they must have the "Allow auto-merge" feature enabled in their settings for this to function.

Workflow Logic

graph TD
    A[Start Release Bot Workflow] --> B{Cherry-pick successful?};
    B -- Yes --> C[Create Pull Request];
    C --> D[Enable Auto-Merge via `gh pr merge --auto`];
    D --> E[End];
    B -- No --> F[Create Draft Pull Request with Conflicts];
    F --> G["Add 'needs-manual-cherry-pick' label"];
    G --> E;
Loading

Scope Discovery & Context Expansion

The change is confined to the release-bot.yaml workflow file. However, its impact extends to all repositories that consume this reusable workflow. As noted in the PR description, a manual audit of consumer repositories is required to ensure the "Allow auto-merge" setting is enabled to fully leverage this new functionality. Without this setting, the new step will fail silently (|| true), and the auto-merge will not be enabled, but the workflow will continue.

Metadata
  • Review Effort: 1 / 5
  • Primary Label: enhancement

Powered by Visor from Probelabs

Last updated: 2026-04-16T20:39:44.430Z | Triggered by: pr_opened | Commit: de03f26

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs
Copy link
Copy Markdown

probelabs Bot commented Apr 16, 2026

Security Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release-bot.yaml:320
The `gh pr merge` command is executed with `|| true`, which suppresses the exit code. If the command fails (e.g., due to insufficient permissions, an invalid PR URL, or other transient errors), the failure will be silently ignored. This could lead to a situation where a pull request that was expected to be auto-merged is not, without any notification or workflow failure, potentially delaying releases or critical patches.
💡 SuggestionRemove `|| true` to ensure that the workflow step fails if the `gh pr merge` command fails. This will make the workflow fail and alert maintainers to the problem, allowing for manual intervention. If there are specific non-critical errors that should be ignored, add more specific error handling logic instead of silencing all failures.

✅ Performance Check Passed

No performance issues found – changes LGTM.

Security Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release-bot.yaml:320
The `gh pr merge` command is executed with `|| true`, which suppresses the exit code. If the command fails (e.g., due to insufficient permissions, an invalid PR URL, or other transient errors), the failure will be silently ignored. This could lead to a situation where a pull request that was expected to be auto-merged is not, without any notification or workflow failure, potentially delaying releases or critical patches.
💡 SuggestionRemove `|| true` to ensure that the workflow step fails if the `gh pr merge` command fails. This will make the workflow fail and alert maintainers to the problem, allowing for manual intervention. If there are specific non-critical errors that should be ignored, add more specific error handling logic instead of silencing all failures.
\n\n \n\n

✅ Performance Check Passed

No performance issues found – changes LGTM.

\n\n

Quality Issues (1)

Severity Location Issue
🟡 Warning .github/workflows/release-bot.yaml:318
The use of `|| true` suppresses any exit code from the `gh pr merge` command, causing the step to succeed even if enabling auto-merge fails. This can happen if the repository settings do not allow auto-merging or if there are permission issues. This silent failure can lead to confusion when pull requests are not merged as expected, as the workflow will not report any error.
💡 SuggestionRemove `|| true` to ensure that the workflow step fails if the `gh pr merge` command encounters an error. This will make failures in the auto-merge process visible and allow for proper debugging and resolution.

Powered by Visor from Probelabs

Last updated: 2026-04-16T20:39:25.582Z | Triggered by: pr_opened | Commit: de03f26

💡 TIP: You can chat with Visor using /visor ask <your question>

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