actions / stale

Marks issues and pull requests that have not had recent interaction
MIT License
1.34k stars 353 forks source link

Allow filtering of PRs by review status or other criteria #1143

Open gtjoseph opened 5 months ago

gtjoseph commented 5 months ago

Description: Allow filtering of PRs by review status

Justification: If a PR is waiting for us to review it, we'll get to it eventually so we don't want it marked stale or auto-closed. However, we DO want the process applied to PRs where the PR submitter hasn't responded to requests for changes in a certain amount of time (review:changes_requested). Sure, we could manually add labels to the PRs to make them eligible or exempt from expiration but that defeats the purpose of the action. We could also write our own "pre-action" that automatically adds or removes labels based on review state but if we're going to do that, we might as well just do the expiration stuff ourselves as well.

I'm wondering... maybe a filter by generic search string would be better since you could call the REST /search/issues endpoint with it. Actually this is what the submitted PR does

Are you willing to submit a PR? Yes! Sumitted.

HarithaVattikuti commented 5 months ago

Hello @gtjoseph Thank you for creating this feature request. We will investigate it and get back to you as soon as we have some feedback.

gtjoseph commented 5 months ago

@HarithaVattikuti Actually I have a PR coming that adds the ability to retrieve issues and PRs using a search string and client.rest.search.issuesAndPullRequests instead of blanket retrieving all open issues and PRs from the owner/repo using client.rest.issues.listForRepo. I'm just testing it now.