probot / stale

A GitHub App built with Probot that closes abandoned Issues and Pull Requests after a period of inactivity.
https://probot.github.io/apps/stale/
ISC License
1.25k stars 212 forks source link

Exponential backoff #353

Open mjambon opened 2 years ago

mjambon commented 2 years ago

I think it would be great for the bot to operate with exponential backoff, so as to not bother the authors of issues that are expected to take a long time. The feature would consist of setting daysUntilStale to a value that increases with the age of the issue rather than being fixed. For example, an issue can be considered stale if the delay since the last activity exceeds half the age of the issue.

A timeline would look like this:

|------------------------------------------------------------------------------------>
^               ^               ^
creation        last activity   bot marks issue stale

|------------------------------------------------------------------------------------>
^                               ^                               ^
creation                        last activity                   bot marks issue stale
                                (user removes "stale" label)

The benefit is that long-term issues and short-term issues can coexist harmoniously, each getting stalebot interventions when appropriate and not too often. For an issue that stays open for a year, a sample schedule of stalebot interventions would be, assuming nobody touches the issue other than for removing the "stale" label:

Compare with a fixed delay of 2 months:

What do you think?

FranklinYu commented 2 years ago

Folks, please also vote for actions/stale#34 like @mjambon did.