Skip to content
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

Only-label shoud act as a filter #1046

Open
ov7a opened this issue Jul 5, 2023 · 7 comments
Open

Only-label shoud act as a filter #1046

ov7a opened this issue Jul 5, 2023 · 7 comments
Labels
feature request New feature or request to improve the current logic

Comments

@ov7a
Copy link

ov7a commented Jul 5, 2023

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.

@ov7a ov7a added feature request New feature or request to improve the current logic needs triage labels Jul 5, 2023
@dusan-trickovic
Copy link
Contributor

Hello, @ov7a ! Thanks for creating the issue! We'll do some investigation and see what seems to be the problem :)

@dsame
Copy link
Contributor

dsame commented Aug 9, 2023

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 #1033 which is accessible now from main branch:

      - uses: actions/stale@main

Did it help?

@ov7a
Copy link
Author

ov7a commented Aug 9, 2023

@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.

@dsame
Copy link
Contributor

dsame commented Aug 10, 2023

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.

@kurtqq
Copy link

kurtqq commented Aug 29, 2023

@dsame can you also take a look at #837 ? it has some similarities

@mraleph
Copy link

mraleph commented Aug 30, 2023

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.

@mraleph
Copy link

mraleph commented Aug 30, 2023

I made a PR: #1084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

5 participants