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

Feature Request: Remove "CLOSED" tag if an auto-closed issue gets reopened #278

Closed
william76 opened this issue Jan 18, 2021 · 4 comments · Fixed by #334
Closed

Feature Request: Remove "CLOSED" tag if an auto-closed issue gets reopened #278

william76 opened this issue Jan 18, 2021 · 4 comments · Fixed by #334
Labels
enhancement New feature or request

Comments

@william76
Copy link

Version: v3.0.14

We had an issue get closed through the action script after being marked stale. After it was marked stale, our developer re-opened the issue. They did not touch anything else or add any comments, they just re-opened the issue. The actions/stale bot script did remove the "STALE" flag but it did not remove the "CLOSED_DUE_TO_INACTIVITY" flag that we have set up.

This left a confusing issue that was open but also had the 'CLOSED' tag assigned to it.

Can we get a new feature added to this to have the script/bot also remove the CLOSED label that gets added to an issue when closed if it's ever re-opened (but not if it has activity but is kept closed since a closed issue can still have activity)?

@hross hross added the enhancement New feature or request label Jan 19, 2021
@techtanic
Copy link

+1

@C0ZEN
Copy link
Contributor

C0ZEN commented Feb 27, 2021

I can provide a PR today for this @william76.
Just to be sure the only case where the closed label should be removed is when there was some activity in the issue/PR and the option remove-stale-when-updated is enabled?

Checking the code I see a lot of cases where removing the close label can be helpful.
I think now that the good solution would be to simply remove it right from the start of the workflow once we know that the issue is not closed.
Basically, if the issue is open (stale or not) and with a close label it's not logical so it can be removed.

@william76
Copy link
Author

@C0ZEN Thanks!

We have had some old issues in our repository where some developers didn't 'repoen' them until after the issue got closed and they just re-opened it without touching labels.

It seems reasonable that the auto-closer would remove both the 'CLOSED' and 'STALE' labels if an issue is re-opened or if it's had new activity which would reset the timer.

Thanks for having a look at this!

@C0ZEN
Copy link
Contributor

C0ZEN commented Feb 27, 2021

@william76 re-opening an issue/PR update the updated_at field from an issue/PR which is already a criterion to know if the issue/PR should be stale or not so nothing to do on this particular case.
The current process will see that the idle days was changed and will remove the stale label if necessary.
Thank you for confirming this logic.

@hross hross closed this as completed in #334 Mar 1, 2021
hross pushed a commit that referenced this issue Mar 1, 2021
…osed nor locked (#334)

* feat(assignees): add new option to avoid stale for assignees

closes #271

* test: add more coverage

* docs: fix readme format issue

* docs: reorder and enhance typo

* docs(contributing): add more information about the npm scripts

* docs(readme): update the default values to reflect the real applied ones

* feat(close-label): automatically remove it when no longer closed nor locked

closes #278
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants