Added merge conflict label workflow#29
Conversation
📝 WalkthroughWalkthroughIntroduces a GitHub Actions workflow that automatically detects pull requests with merge conflicts, applies a "PR has merge conflicts" label, and posts a guidance comment with educational resources. 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.
🧹 Nitpick comments (1)
.github/workflows/label-merge-conflicts.yml (1)
3-6: Add branch filter topushtrigger to avoid unnecessary workflow runs.The
pushevent without branch filters will trigger this workflow on every push to any branch in the repository. For detecting conflicts caused by base branch updates, you typically only need to run on pushes to your default/protected branches (e.g.,main).♻️ Suggested improvement
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 3 - 6, The push trigger currently has no branch filter so the workflow runs on every push; update the workflow's on: push configuration to include a branches filter (e.g., add branches: ['main'] or your repo's default/protected branches) so that only pushes to the main/default branch trigger the workflow; keep the existing pull_request_target: types unchanged. Reference the top-level keys in the workflow (on:, push, pull_request_target) and add the branches array under push to limit runs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/label-merge-conflicts.yml:
- Around line 3-6: The push trigger currently has no branch filter so the
workflow runs on every push; update the workflow's on: push configuration to
include a branches filter (e.g., add branches: ['main'] or your repo's
default/protected branches) so that only pushes to the main/default branch
trigger the workflow; keep the existing pull_request_target: types unchanged.
Reference the top-level keys in the workflow (on:, push, pull_request_target)
and add the branches array under push to limit runs.
|
@dhruvi-16-me can you please check why 1 github test is failing. |
|
@dhruvi-16-me fix this linting issue aswell for this PR. |
Addressed Issues:
Fixes #(TODO: issue number)
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