stale
stale copied to clipboard
Only-label shoud act as a filter
Description/Justification: I'm running a stale action with "only-labels" setting. I expect it to act as a filter, so only issues/prs labeled with particular labels are considered during the run.
However, the current behavior is to do a full-scan. It drains the operation limit very fast.
Hello, @ov7a ! Thanks for creating the issue! We'll do some investigation and see what seems to be the problem :)
Hello @ov7a , unfortunately it is not possible to filter out issues by label, but the problem of running out API rate limit is expected to be solved with https://github.com/actions/stale/pull/1033 which is accessible now from main branch:
- uses: actions/stale@main
Did it help?
@dsame Thank you for the reply. Could you please provide more details on why it's not possible?
The statefulness is a great feature! However, I think it’s only a partial solution to the problem. Consider a case when a repository has 2000+ open issues, but only 100 of them have some label. Full scan is 20x times slower. It also wastes a lot resources.
Hello @ov7a, to know the labels of the issue, it has to be fetched first. This is the limitation of GitHub REST API used by stale action. The migration to GraphQL is not planned at the moment.
The fetching bunch of issue is just one GitHub API call, so it does not affect reaching limit of API rate greatly.
@dsame can you also take a look at https://github.com/actions/stale/issues/837 ? it has some similarities
Hello @ov7a, to know the labels of the issue, it has to be fetched first. This is the limitation of GitHub REST API used by stale action.
I don't think this is true. API has labels
parameter to filter out issues based on the list of labels.
I made a PR: https://github.com/actions/stale/pull/1084