Skip to content

ci: add needs-rebase label management to Mergify - #427

Merged
CatherineSue merged 2 commits into
mainfrom
fix/temp-disable-branch-close
Feb 13, 2026
Merged

CatherineSue merged 2 commits into
mainfrom
fix/temp-disable-branch-close

Conversation

@CatherineSue

@CatherineSue CatherineSue commented Feb 13, 2026 •

Copy link
Copy Markdown
Member

Description

Problem

When PRs have merge conflicts, there's no easy way to filter or track them.

Solution

Add two Mergify rules following vLLM's pattern:

  • Add needs-rebase label + comment with rebase instructions when a PR has conflicts
  • Automatically remove needs-rebase label when the conflict is resolved

Changes

  • Update merge conflict rule in .github/mergify.yml to add needs-rebase label
  • Add new rule to remove needs-rebase label when conflict is resolved

Test Plan

  • Verify Mergify adds needs-rebase label on PRs with conflicts
  • Verify label is removed after rebasing
Checklist
  • cargo +nightly fmt passes
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • Documentation updated

Summary by CodeRabbit

  • Chores
    • Renamed the conflict-notification rule to add a needs-rebase label and post rebase instructions when merge conflicts are detected.
    • Expanded conflict handling to apply the needs-rebase label in addition to commenting.
    • Added automated removal of the needs-rebase label once merge conflicts are resolved.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @CatherineSue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the repository's Mergify configuration to streamline the management of pull requests with merge conflicts. By introducing automated labeling and commenting for conflicting PRs, and subsequently removing the label upon resolution, it aims to improve visibility and tracking of PRs requiring rebase, making the review process more efficient for contributors and maintainers. Additionally, a temporary adjustment was made to the branch naming convention enforcement.

Highlights

  • Automated Conflict Tracking: Implemented Mergify rules to automatically add a 'needs-rebase' label and a comment with rebase instructions to pull requests that have merge conflicts.
  • Conflict Resolution Detection: Added a Mergify rule to automatically remove the 'needs-rebase' label once a pull request's merge conflicts have been resolved.
  • Branch Naming Convention Enforcement: Temporarily disabled the automatic closing of pull requests that do not adhere to the branch naming convention, with a note indicating future re-enablement.
Changelog
  • .github/mergify.yml
    • Updated the 'Branch naming convention' rule to include a note about a grace period and commented out the auto-close action.
    • Modified the 'Notify on merge conflicts' rule to also add the 'needs-rebase' label when conflicts are detected.
    • Added a new rule, 'Remove needs-rebase label when conflict is resolved', to automatically remove the label when conflicts are no longer present.
Activity
  • The pull request was opened by CatherineSue to address the problem of tracking PRs with merge conflicts.
  • The author provided a detailed description of the problem, solution, and changes, along with a test plan.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@coderabbitai

coderabbitai Bot commented Feb 13, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updates .github/mergify.yml: renames the merge-conflict rule to add a needs-rebase label and comment on conflicts, and adds a rule to remove needs-rebase when conflicts are resolved.

Changes

Cohort / File(s) Summary
Mergify configuration
/.github/mergify.yml
Renamed conflict rule to "Add needs-rebase label and comment on merge conflicts"; new action adds needs-rebase label plus comment. Added rule "Remove needs-rebase label when conflict is resolved" to remove the label when no conflict. No other rules changed; branch-naming auto-close remains commented out.

Sequence Diagram(s)

sequenceDiagram
  participant PR as "Pull Request"
  participant Mergify as "Mergify bot"
  participant Repo as "GitHub (labels/comments)"

  PR->>Mergify: created or updated
  Mergify->>Repo: evaluate conflict status
  alt conflicts detected
    Mergify->>Repo: add label rgba(255,0,0,0.5) "needs-rebase"
    Mergify->>Repo: post comment with rebase instructions
  else no conflicts
    Mergify->>Repo: remove label rgba(0,128,0,0.5) "needs-rebase" (if present)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • slin1237

Poem

🐰 I hopped through YAML with a twitch and grace,

I labeled the conflict, left a friendly trace,
I asked for a rebase with a helpful note,
Then cleared the tag when branches wrote,
Hooray—my whiskers twitch for merged embrace!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding needs-rebase label management to Mergify configuration. It is concise, specific, and directly reflects the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/temp-disable-branch-close

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Mergify rules to automatically manage a needs-rebase label for pull requests with merge conflicts. The implementation is sound and correctly adds the label on conflict and removes it upon resolution. The suggestion to optimize the rule that removes the label, making it more efficient by ensuring it only runs on PRs that actually have the needs-rebase label, has been kept.

Comment thread .github/mergify.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/mergify.yml:
- Around line 71-80: The rule "Remove needs-rebase label when conflict is
resolved" currently runs for all non-conflict, non-closed PRs; update its
conditions to only run when the PR actually has the needs-rebase label by adding
a label existence check (e.g., add a condition like "label=needs-rebase")
alongside the existing "- -conflict" and "- -closed" conditions so the action
that removes the "needs-rebase" label only evaluates when that label is present.

Comment thread .github/mergify.yml
@github-actions github-actions Bot added the ci CI/CD configuration changes label Feb 13, 2026
Add needs-rebase label when a PR has merge conflicts and automatically
remove it when the conflict is resolved.

Signed-off-by: Chang Su <chang.s.su@oracle.com>
@CatherineSue
CatherineSue force-pushed the fix/temp-disable-branch-close branch from 3bec898 to 8e5999e Compare February 13, 2026 21:41
Signed-off-by: Chang Su <chang.s.su@oracle.com>
@CatherineSue
CatherineSue merged commit f0a2863 into main Feb 13, 2026
18 of 19 checks passed
@CatherineSue
CatherineSue deleted the fix/temp-disable-branch-close branch February 13, 2026 21:57
ppraneth pushed a commit that referenced this pull request Feb 14, 2026
Signed-off-by: Chang Su <chang.s.su@oracle.com>
Signed-off-by: ppraneth <pranethparuchuri@gmail.com>
ppraneth pushed a commit that referenced this pull request Feb 18, 2026
Signed-off-by: Chang Su <chang.s.su@oracle.com>
Signed-off-by: ppraneth <pranethparuchuri@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant