Do not pull back locked issues/PRs in scheduled events queries #6506
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Locking the issues after 90 days is a brand new rule. It's also the end of a long path (requiring 90 days of inactivity after 7 and then 14 days of inactivity respectively). As it turns out, after an issue has been closed and locked someone can come back and reopen the issue but leave it locked. The problem with locked issues is comments can't be added which is what most of our scheduled tasks do. This was causing processing failures. The correct solution is to modify the query to omit locked issues from the results. It's also worth noting that these queries should have been omitting locked items from the query result to begin with. Notice that the LockClosedIssues only ever looks for issues that aren't already locked which is what the other queries should have been doing to begin with.