Skip to content

feat: add automated merge conflict labeling workflow#60

Open
akshat99812 wants to merge 1 commit intoStabilityNexus:mainfrom
akshat99812:label-conflict
Open

feat: add automated merge conflict labeling workflow#60
akshat99812 wants to merge 1 commit intoStabilityNexus:mainfrom
akshat99812:label-conflict

Conversation

@akshat99812
Copy link

@akshat99812 akshat99812 commented Feb 9, 2026

This PR introduces a GitHub Action to automate the management of a needs-rebase label, ensuring that the status of a PR is visible at a glance.

Summary of Changes
Added Conflict Detection Workflow: A new GitHub Action (.github/workflows/check-conflicts.yml) that triggers on PR synchronization and updates to the main branch.

Automated Labeling: * Adds a needs-rebase label if the PR has merge conflicts.

Automatically removes the label once the contributor resolves the conflicts.

Maintainer Visibility: Enables filtering the PR list by "No Label" to prioritize merge-ready work.
Screenshot 2026-02-09 at 11 58 39 PM

Summary by CodeRabbit

  • Chores
    • Implemented automated pull request conflict detection that labels conflicted pull requests and sends notifications to contributors about resolving conflicts.

@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow is introduced that automatically labels pull requests with merge conflicts using the eps1lon/actions-label-merge-conflict action. The workflow triggers on PR events and main branch pushes, applying the "status: conflicted" label to conflicted PRs and posting a reusable comment directing contributors to resolve conflicts.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/label-conflicts.yml
New PR maintenance workflow that automatically labels conflicted PRs with "status: conflicted", removes the label when clean, and posts a comment prompting rebasing or merging with main branch.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • #47: This PR directly implements the requested automatic merge conflict PR labeling workflow, addressing the core objective of automatically identifying and notifying about conflicted pull requests.

Poem

🐰 A workflow so neat, it hops through your PRs,
Labels conflicts bright, like warning stars,
"Rebase me," it says with a friendly chime,
No more confusing merge conflicts to climb! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: introducing an automated workflow for labeling merge conflicts in pull requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

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/workflows/label-conflicts.yml:
- Line 6: The workflow comment contains a copy-paste artifact referencing
"Next.js"; update the text in .github/workflows/label-conflicts.yml (the comment
line "# Crucial: Re-check all PRs when Next.js code is merged to main") to refer
to this repo (e.g., "Maelstrom-WebUI") or make it generic (e.g., "when code is
merged to main") so it accurately describes the project; ensure the replaced
string "Next.js" is removed and the intent of re-checking PRs is preserved.
🧹 Nitpick comments (1)
.github/workflows/label-conflicts.yml (1)

18-18: Pin this action to a full commit SHA.

Since this workflow uses pull_request_target (which runs with write access to the base repo context), pinning to a mutable tag like @v3 means a compromised upstream release could inject code running with elevated privileges. Pinning to the specific commit SHA is GitHub's recommended mitigation for supply-chain risk.

For v3.0.3, use:

uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0  # v3.0.3

# Check when a PR is updated
pull_request_target:
types: [opened, synchronize, reopened]
# Crucial: Re-check all PRs when Next.js code is merged to main
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Copy-paste artifact: comment references "Next.js" instead of this project.

This comment appears to be copied from another repository's workflow. It should reference "Maelstrom-WebUI" (or simply be made generic) rather than "Next.js."

Proposed fix
-  # Crucial: Re-check all PRs when Next.js code is merged to main
+  # Crucial: Re-check all open PRs when code is merged to main
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Crucial: Re-check all PRs when Next.js code is merged to main
# Crucial: Re-check all open PRs when code is merged to main
🤖 Prompt for AI Agents
In @.github/workflows/label-conflicts.yml at line 6, The workflow comment
contains a copy-paste artifact referencing "Next.js"; update the text in
.github/workflows/label-conflicts.yml (the comment line "# Crucial: Re-check all
PRs when Next.js code is merged to main") to refer to this repo (e.g.,
"Maelstrom-WebUI") or make it generic (e.g., "when code is merged to main") so
it accurately describes the project; ensure the replaced string "Next.js" is
removed and the intent of re-checking PRs is preserved.

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.

2 participants