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

New comments do not remove the Stale label #21

Closed
gergelyke opened this issue Sep 13, 2019 · 37 comments
Closed

New comments do not remove the Stale label #21

gergelyke opened this issue Sep 13, 2019 · 37 comments

Comments

@gergelyke
Copy link

As raised in uber/baseweb#1892, it seems like new comments do not remove the Stale label. Do we miss anything in our configuration?

name: 'Close stale issues'
on:
  schedule:
    - cron: '0 0 * * *'

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v1
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          stale-issue-message: "This issue is stale because it has been open 30 days with no activity. If it's still valid, please remove the stale label or comment on the issue, otherwise this ticket will be closed in 5 days"
          days-before-stale: 30
          days-before-close: 5
@LekoArts
Copy link

I'd also be interested in knowing if this is a bug or user error.

@m-allanson
Copy link

It looks like this feature hasn't (yet 😄) been implemented in the action. Is this a feature that would be accepted?

@eileenmcnaughton
Copy link

I am +1 on that feature being useful!

@homotechsual
Copy link

Also +1 on the feature being useful :-)

@LekoArts
Copy link

@gergelyke @eileenmcnaughton @MikeyMJCO
I've implemented this feature in our fork here: https://github.com/gatsbyjs/stale/blob/128ed907d5174a32717e7761e63294f5c747d8e2/src/main.ts#L122-L130

It lists all comments since the "days-before-stale" and filters for bot/user comments. If it can find user comments, the resulting array is not empty and hence the function return true.

@ruudk
Copy link

ruudk commented Nov 8, 2019

@LekoArts so cool, did you consider proposing this as a PR to this repo? Would love this to be standard feature ❤️

@eileenmcnaughton
Copy link

Agree - this needs to be a standard feature before the main feature is usable

@LekoArts
Copy link

LekoArts commented Nov 9, 2019

I changed the logic in the meantime to a more robust way of checking it: https://github.com/gatsbyjs/stale/blob/gatsby-refactoring/src/main.ts#L143

This is all WIP so use it at your own risk, we're still testing ourselves. And if they maintain the repository again and would accept a PR we gladly would PR that upstream.

@eileenmcnaughton
Copy link

Hmm so the upstream repo is not maintained anymore :-(

@TheSalesOpsGuy
Copy link

Were you ever able to merge your fork/updates into the main action? I'm trying to get the old probot functionality back as well (remove label if commented).

@LekoArts
Copy link

LekoArts commented Mar 3, 2020

You can use our fork if you want: https://github.com/gatsbyjs/stale
It's been working great for us. Since the repo still seems inactive a PR seems unfeasible - we'd be happy to send it in though.

@Tejas2805
Copy link

Hi,

Any way to stop issues from closing?

@dev-zero
Copy link

It would be nice if it could then also remove other labels as well. Our use case is that we would like to only have stale-handling for issues marked with needinfo. In case of a comment both needinfo and stale labels should be removed.

@hross
Copy link
Contributor

hross commented Apr 16, 2020

I agree this should be done. I'll add it to the list (I'm actively reviving this repo since it was somewhat stale a while ago).

@ramnes
Copy link

ramnes commented Apr 19, 2020

Just discovering this and yeah, it's much needed, because if users are not able to stop the countdown, then as a maintainer I'd probably want the issue to be closed right away instead.

@TheSalesOpsGuy
Copy link

Just discovering this and yeah, it's much needed, because if users are not able to stop the countdown, then as a maintainer I'd probably want the issue to be closed right away instead.

I think the issue is just that the label isn't cleared, the script still checks for the last updated date on the issue so a user commenting resets the counter, it just doesn’t also clear the flag (which may or may not be a good thing depending on how you like your labels to work)

@hross
Copy link
Contributor

hross commented May 2, 2020

@damccorm PR is up over here (not quite working yet): #58 if you want to review it

@Gustry
Copy link

Gustry commented May 13, 2020

FYI #58 has been merged. You can try again.

@homotechsual
Copy link

This is working for us now.

@Tejas2805
Copy link

Still doesn't work for me. My configuration makes it runs every min, still.

Screen Shot 2020-07-09 at 4 31 16 PM

@homotechsual
Copy link

Still doesn't work for me. My configuration makes it runs every min, still.

Screen Shot 2020-07-09 at 4 31 16 PM

Can you link your repo?

@Tejas2805
Copy link

Still doesn't work for me. My configuration makes it runs every min, still.
Screen Shot 2020-07-09 at 4 31 16 PM

Can you link your repo?

https://github.com/Tejas2805/Github-Actions

@homotechsual
Copy link

Can you try adding remove-stale-when-updated: 'True' to your yml file.

@homotechsual
Copy link

You also have to factor in that it will only run on a limited number of issues/PR per run and so it may take a few runs to get to the changes.

@homotechsual
Copy link

Ah - nvm - found it. It's ignoring your comments.

@homotechsual
Copy link

Comments not made by Tejas2805 or another bot: 0

https://github.com/Tejas2805/Github-Actions/runs/853183570?check_suite_focus=true

@homotechsual
Copy link

Try with a comment made by someone else!

@Tejas2805
Copy link

Any reason? Cause the PR is made by me.

@homotechsual
Copy link

Yeah - it ignores the author from what I can see!

@homotechsual
Copy link

I made a comment to test - if you can increase the frequency of your runs again!

@homotechsual
Copy link

And nevermind - it ran and remove the label!

@Tejas2805
Copy link

Any way to make it remove when the author comments? Cause I think the "stale" part comes from the fact that the author is not active on it.

@homotechsual
Copy link

Okay so the answer is yes, it ignores github.context.actor which is the user who setup/runs the GitHub action.

So it's not ignoring you because you're the author, it's ignoring you because you run the action!

@Tejas2805
Copy link

So it's not ignoring you because you're the author, it's ignoring you because you run the action!

Ah! Makes sense. Thank you for your help.

@homotechsual
Copy link

@hross I'm gonna suggest that you close this issue now if that seems appropriate? It's original issue has been addressed!

@rdxmb
Copy link

rdxmb commented Jan 26, 2021

Does this problem still exist? See helm/helm#4262 (comment)

@bridgetkromhout
Copy link

Does this problem still exist? See helm/helm#4262 (comment)

@rdxmb The helm/helm repo stale issue action (https://github.com/helm/helm/actions?query=workflow%3A%22Close+stale+issues%22) runs once per day, not on-demand. So you'll see if you re-check that issue that you did indeed get the issue marked as not-stale - it just wasn't instant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests