Filter based on issue type
Description:
Introduce a parameter only-issue-types that ensures that only issues of a specific type are set to stale and closed.
Justification: With the introduction of types, GitHub as given organizations a new issue attribute that can be used for categorization/classification of issues. For different issue types it would be desirable to have different stale settings just like we currently can have for labels. E.g. in my organization, we'll be using the new issue type for separating questions from feature requests. Questions should go stale faster.
Are you willing to submit a PR? I'm open to try so, but will need some pointers, especially on testing. I'm not familia with TypeScript (or very familiar with JS at all …)
Hello @Bibo-Joshi, Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.
We are switching over to issue types as well over in zed.dev's issue tracker - would love to have this configuration option.
This is very much needed, otherwise we have duplicates for labels and types now.
One thing to note is that GitHub's REST API doesn't even support filtering by type, as far as I can tell. So until that lands, getting that feature in the stale action is totally blocked.
https://github.com/orgs/community/discussions/140874#discussioncomment-11582660
Looks like they've added Issue Type to the Reset API.
Any progress with this one? I think there are no blocking things with it.
Stale bot is currently unusable without support for issue types...
@mahabaleshwars I'd still be open to giving this a shot if you could provide me with a few pointers on how to get started :)
@Bibo-Joshi Since it is pretty much the same as the exempt-issue-labels option right now, I guess its something like:
- check out the repo and read the https://github.com/actions/stale/blob/main/CONTRIBUTING.md
- extend the options enum like here https://github.com/actions/stale/blob/f78de9780efb7a789cf4745957fa3374cbb94fd5/src/enums/option.ts#L15
- do something similar to the exeption logik here: https://github.com/actions/stale/blob/f78de9780efb7a789cf4745957fa3374cbb94fd5/src/classes/issues-processor.ts#L351-L369
- extend the docs like here https://github.com/actions/stale/blob/f78de9780efb7a789cf4745957fa3374cbb94fd5/action.yml#L48
- search the whole repo for
exempt-issue-labelsandExemptIssueLabelsto find all occurence where you have to - add a test like here https://github.com/actions/stale/blob/f78de9780efb7a789cf4745957fa3374cbb94fd5/tests/main.spec.ts#L1021-L1051
Hi @Bibo-Joshi , Thank you for bringing this up. The recent update to the REST API has introduced Issue Type as parameter for filtering the issue, you can check the following thread and link for more information. We will look into its implementation in future updates.
I've given it a try in https://github.com/actions/stale/pull/1255 :)