Add automated merge conflict labeling workflow#205
Add automated merge conflict labeling workflow#205dhruvi-16-me wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
📝 WalkthroughWalkthroughA new GitHub Actions workflow is introduced that automatically labels pull requests containing merge conflicts. The workflow triggers on push and pull_request_target events, using an external action to identify and label conflicted PRs with a designated label and comment. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 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)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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
🧹 Nitpick comments (1)
.github/workflows/label-merge-conflicts.yml (1)
4-6: Scope thepushtrigger to your base branch.Line 4 currently runs on every push. If the goal is re-checking PRs when base updates, limit it to the integration branch (for example
main) to reduce unnecessary runs.🎯 Proposed change
on: push: + branches: [main] pull_request_target: types: [opened, reopened, synchronize]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/label-merge-conflicts.yml around lines 4 - 6, The workflow's push trigger is currently unscoped; change the push trigger block to restrict runs to the repo's base/integration branch (e.g., replace the top-level "push:" with a push block that includes "branches: [main]") so pushes to other branches won't trigger the job; leave the pull_request_target types as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/label-merge-conflicts.yml:
- Around line 17-20: Replace the mutable action tag used in the workflow (the
line containing "uses: eps1lon/actions-label-merge-conflict@v3") with a fixed
40-character commit SHA for that action; fetch the latest trusted commit SHA
from the upstream action repo, update the "uses" value to
"eps1lon/actions-label-merge-conflict@<full-commit-sha>", and keep the existing
inputs (dirtyLabel and repoToken) unchanged so the workflow behavior remains
identical while preventing silent upstream changes.
---
Nitpick comments:
In @.github/workflows/label-merge-conflicts.yml:
- Around line 4-6: The workflow's push trigger is currently unscoped; change the
push trigger block to restrict runs to the repo's base/integration branch (e.g.,
replace the top-level "push:" with a push block that includes "branches:
[main]") so pushes to other branches won't trigger the job; leave the
pull_request_target types as-is.
|
Hey @SharkyBytes Check this pr. Please merge. |
|
Hey @SharkyBytes I haven't raised an issue for this because it is approved by Bruno. |
Summary
This PR introduces an automated workflow that labels pull requests with merge conflicts using
eps1lon/actions-label-merge-conflict.When a PR has merge conflicts:
Why This Change?
Currently, maintainers must manually identify and notify contributors when their PR requires rebasing. This creates unnecessary review overhead and delays.
This workflow:
Behavior
When merge conflicts appear:
When conflicts are resolved:
Testing
The full lifecycle was tested in an isolated test repository:
Screenshots
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit