feat: add automated merge conflict labeling workflow#60
feat: add automated merge conflict labeling workflow#60akshat99812 wants to merge 1 commit intoStabilityNexus:mainfrom
Conversation
📝 WalkthroughWalkthroughA 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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@v3means 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 |
There was a problem hiding this comment.
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.
| # 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.
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.

Summary by CodeRabbit