mergify changes for stale PRs#8
Conversation
📝 WalkthroughWalkthroughAdds three new mergify rules to automate stale pull request management: labeling inactive PRs after 60 days, closing them after 90 days with a message, and removing the stale label when activity resumes. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/mergify.yml:
- Around line 89-96: The "remove stale label when PR has activity" rule removes
the stale label immediately because it lacks a time-based activity check; update
the rule's conditions (for the rule named "remove stale label when PR has
activity" that currently checks label=stale and -closed) to include a
recent-activity condition that only fires when the PR has had activity within
the last 60 days so the rule won't trigger immediately after the "mark as stale"
comment; keep the existing label removal action for 'stale' but add the
time-based condition to the conditions list to ensure proper delay.
| - name: remove stale label when PR has activity | ||
| conditions: | ||
| - label=stale | ||
| - -closed | ||
| actions: | ||
| label: | ||
| remove: | ||
| - stale |
There was a problem hiding this comment.
Rule will immediately undo the stale label due to missing activity check.
This rule triggers whenever a PR has the stale label and is not closed. However, when the "mark as stale" rule fires, the comment it posts counts as activity, and this rule's conditions become satisfied immediately after. The result: the stale label gets added and then instantly removed.
Add a time-based condition to ensure the rule only fires when there's been recent activity (i.e., within the last 60 days):
🐛 Proposed fix
- name: remove stale label when PR has activity
conditions:
- label=stale
+ - updated-at>=60 days ago
- -closed
actions:
label:
remove:
- stale🤖 Prompt for AI Agents
In @.github/mergify.yml around lines 89 - 96, The "remove stale label when PR
has activity" rule removes the stale label immediately because it lacks a
time-based activity check; update the rule's conditions (for the rule named
"remove stale label when PR has activity" that currently checks label=stale and
-closed) to include a recent-activity condition that only fires when the PR has
had activity within the last 60 days so the rule won't trigger immediately after
the "mark as stale" comment; keep the existing label removal action for 'stale'
but add the time-based condition to the conditions list to ensure proper delay.
Provide a short summary in the Title above. Examples of good PR titles:
Usecase - iLab Knowledge Pipeline
Description
Give a more detailed description of your changes here. Include any motivation and context.
Fixes # (issue)
Related Tickets
Related jira tickets here:
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details for your
test configuration
Test Configuration:
Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.