Skip to content

Add automated merge conflict labeling workflow#68

Open
dhruvi-16-me wants to merge 1 commit intoAOSSIE-Org:mainfrom
dhruvi-16-me:merge-conflict-label
Open

Add automated merge conflict labeling workflow#68
dhruvi-16-me wants to merge 1 commit intoAOSSIE-Org:mainfrom
dhruvi-16-me:merge-conflict-label

Conversation

@dhruvi-16-me
Copy link

@dhruvi-16-me dhruvi-16-me commented Feb 16, 2026

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:

  • A label “PR has merge conflicts” is automatically added.
  • A comment is posted notifying the contributor.
  • The label is automatically removed once conflicts are resolved.

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:

  • Improves PR triage visibility
  • Notifies contributors immediately when conflicts arise
  • Reduces manual maintainer intervention
  • Ensures PRs are conflict-free before review

Behavior

When merge conflicts appear:

  • Label added: PR has merge conflicts
  • Comment posted:

⚠️ This PR has merge conflicts.
Please resolve the merge conflicts before review.
Your PR will only be reviewed by a maintainer after all conflicts have been resolved.
Watch this video to understand why conflicts occur and how to resolve them.

When conflicts are resolved:

  • Label is automatically removed.

Testing

The full lifecycle was tested in an isolated test repository:

  • Conflict created → label + comment added
  • Conflict resolved → label removed
  • Subsequent base merges → re-check works correctly

Screenshots

Screenshot 2026-02-16 221209 Screenshot 2026-02-16 221254

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contributing Guidelines

⚠️ AI Notice - Important!

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

Release Notes

  • Chores
    • Added automated merge conflict detection that labels pull requests with merge conflicts and posts guidance comments for reviewers.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

Walkthrough

A new GitHub Actions workflow is introduced to automatically label pull requests with merge conflicts and post informational comments. The workflow triggers on push and pull request events, utilizing a third-party action to detect conflicts and maintain code quality standards.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/label-merge-conflicts.yml
New workflow that labels PRs with merge conflicts using the eps1lon/actions-label-merge-conflict@v3 action and posts a comment providing conflict resolution guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • Zahnentferner

Poem

🐰 Conflicts detected with rabbit precision,
A label applied, quick decision!
Comments now guide the lost dev,
Merging made simple, no more duress!

🚥 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 accurately and concisely summarizes the main change: introducing an automated GitHub Actions workflow for labeling merge conflicts.
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

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@github-actions github-actions bot added size/S and removed size/S labels Feb 16, 2026
Copy link
Contributor

@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: 2

🤖 Fix all issues with AI agents
In @.github/workflows/label-merge-conflicts.yml:
- Around line 3-6: The workflow's push trigger is unscoped and fires on every
branch; update the YAML to scope the push event to the repository default branch
(e.g., change the existing push: entry to push: with a branches: [main] array).
Edit the top-level "on:" block that contains "push:" and "pull_request_target:"
so that "push" only lists the default branch (referencing the "on:", "push:",
and "pull_request_target:" entries) to prevent running the workflow for
feature-branch pushes.
- Line 17: Replace the mutable reference uses:
eps1lon/actions-label-merge-conflict@v3 with the action pinned to an exact
commit SHA (the full 40-char SHA from the action repo commit) and add a trailing
comment with the readable version tag (for example: # v3.0.3) so reviewers know
which release the SHA corresponds to; ensure you update the uses line to use the
SHA form (e.g., `@sha`) and include the version tag comment directly above or on
the same line for traceability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments