Skip to content

feat: auto-close inactive merge-conflicted PRs#1289

Merged
rohan-pandeyy merged 2 commits into
AOSSIE-Org:mainfrom
VanshajPoonia:feat/stale-merge-conflicted-prs
May 28, 2026
Merged

feat: auto-close inactive merge-conflicted PRs#1289
rohan-pandeyy merged 2 commits into
AOSSIE-Org:mainfrom
VanshajPoonia:feat/stale-merge-conflicted-prs

Conversation

@VanshajPoonia

@VanshajPoonia VanshajPoonia commented May 25, 2026

Copy link
Copy Markdown
Contributor

Addressed Issues:

Fixes #1279

Screenshots/Recordings:

N/A — this PR only adds a GitHub Actions workflow and does not include UI changes.

Additional Notes:

This PR adds a separate scheduled workflow for stale merge-conflicted PR cleanup. The existing merge conflict labeling workflow is left unchanged.

The new workflow only targets PRs with the PR has merge conflicts label, warns them after 30 days of inactivity, and closes them after 5 additional inactive days if there is still no activity.

AI Usage Disclosure:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: ChatGPT and Codex

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • 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 Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Chores
    • Added an automated workflow to manage pull requests labeled "PR has merge conflicts": runs daily (and can be triggered manually), warns after 30 days of inactivity, closes after 5 additional days, preserves the original label meaning, does not process issues, clears stale status when a PR is updated, limits items processed per run, and includes guidance for resolving conflicts.

Review Change Stack

@github-actions github-actions Bot added CI/CD enhancement New feature or request labels May 25, 2026
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 16ca8806-dde6-43df-b994-795201938049

📥 Commits

Reviewing files that changed from the base of the PR and between 1a69dd2 and c8c9961.

📒 Files selected for processing (1)
  • .github/workflows/stale-merge-conflicts.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/stale-merge-conflicts.yml

Walkthrough

Adds a new scheduled GitHub Actions workflow that targets PRs labeled PR has merge conflicts, posts a warning after 30 days of inactivity, and auto-closes the PR after 5 additional inactive days using custom labels and messages.

Changes

Stale merge-conflict PR auto-closure

Layer / File(s) Summary
Stale PR detection and auto-closure configuration
.github/workflows/stale-merge-conflicts.yml
Adds a GitHub Actions workflow (daily cron + manual dispatch) using actions/stale@v10 to process only PRs labeled PR has merge conflicts, warn after 30 inactive days with a multi-line message, auto-close after 5 more inactive days, use distinct stale/close labels, clear stale status on PR updates, and limit processed items per run.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • rahulharpal1603
  • rohan-pandeyy

Poem

"I hop through commits with a helpful cheer,
Waiting thirty days, then whispering near,
'Fix your conflicts, or give a small sign,'
Five days more, then tidy the vine. 🐰🌿"

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 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: adding auto-closure functionality for inactive merge-conflicted PRs.
Linked Issues check ✅ Passed The PR fully implements all coding requirements from issue #1279: detects merge-conflicted PRs, warns after 30 days of inactivity, closes after 5 additional days, and uses clear warning/closure messages.
Out of Scope Changes check ✅ Passed All changes are within scope—only a new GitHub Actions workflow file is added to implement the stale PR cleanup mechanism without modifying existing workflows or other code.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/stale-merge-conflicts.yml:
- Line 19: The workflow currently references the mutable tag "actions/stale@v10"
which must be pinned to a full 40-character commit SHA; update the uses entry
for the stale action (the line containing "uses: actions/stale@v10") to use the
corresponding full commit SHA (e.g., "actions/stale@<40-hex-sha>") so the action
is pinned to an exact commit, then commit the change to the workflow file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1e461acd-3a0a-40dd-b9d4-82af4c9686a0

📥 Commits

Reviewing files that changed from the base of the PR and between 0528751 and 1a69dd2.

📒 Files selected for processing (1)
  • .github/workflows/stale-merge-conflicts.yml

Comment thread .github/workflows/stale-merge-conflicts.yml
Updated stale PR messages for clarity and consistency.
@rohan-pandeyy rohan-pandeyy merged commit b88b61d into AOSSIE-Org:main May 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Enhance merge conflict workflow to auto-close stale PRs

2 participants