-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new Scheduled rule: EnforceMaxLifeOfIssues #7693
Add new Scheduled rule: EnforceMaxLifeOfIssues #7693
Conversation
…f a block that contains a ServiceLabel entry which was missing from the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me I'll defer the approval to @jsquire
Just want to verify that merging this won't turn the rule on, it'll just add the rule as an option for the repos to opt into. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks good to me. I'd strongly suggest that we rename the rule to be more generic, as criteria may change over time.
@@ -48,6 +48,7 @@ public class RulesConstants | |||
public const string IdentifyStalePullRequests = "IdentifyStalePullRequests"; | |||
public const string CloseAddressedIssues = "CloseAddressedIssues"; | |||
public const string LockClosedIssues = "LockClosedIssues"; | |||
public const string Enforce2YearMaxLifeOfIssues = "Enforce2YearMaxLifeOfIssues"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe generalize the name a bit, in case we adjust the "2 year" duration at a later point? It would suck to have to go update all the repo config files or have the name and rule mismatch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsquire changed the rule to EnforceMaxLifeOfIssues which is more generic.
@ronniegeraghty this PR only adds the rule processing to the github-event-processor. When this is complete there is another PR that needs to be created that updates the scheduled-event-processor.yml file, in azure-sdk-tools' .github/workflows directory with the new scheduled event and even then, until each individual repository's event-processor.config is updated to turn the rule on, it won't run. New rules, that aren't in the config, default to off. |
Fixes: #7660
Rule: Enforce 2-year max life of issues
Tigger: CRON – Once Weekly which will be '0 10 * * MON' (10am on Monday). Time selected by @ronniegeraghty.
Criteria:
• Issue is Open
• Issue Create Time > 2 years
• Issue was last updated > 30 days (30 ensures that we won't close anything that's actively being looked at and pretty much guarantees it won't interfere with two other scheduled rules, Close Stale Issues and Close Addressed Issues, that close issues.
Actions:
• Close the Issue
• Add the following comment
Hi @
<ISSUE AUTHOR
>, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.• Lock the Issue