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

Stale label not being added #299

Closed
nijel opened this issue Feb 2, 2021 · 1 comment · Fixed by #304
Closed

Stale label not being added #299

nijel opened this issue Feb 2, 2021 · 1 comment · Fixed by #304

Comments

@nijel
Copy link
Contributor

nijel commented Feb 2, 2021

Stale label not being added at all in our repo. To give a specific example, let's take WeblateOrg/weblate#4746

On the last nightly run, the log contains the following entries:

[#4746] Found issue: issue #4746 last updated 2021-01-06T08:51:34Z (is pr? false)
[#4746] Days before issue stale: 10
[#4746] This issue hasn't a stale label

So, the action sees the issue is old, gets correct stale days and sees that the label is not there. It just doesn't label it as stale.

Things most likely go wrong here:

if (!issue.isStale && shouldBeStale && shouldMarkAsStale) {

The question is how to figure out whether there is a bug in the action or there is something misconfigured on our side.

nijel added a commit to nijel/stale that referenced this issue Feb 3, 2021
This might help to understand some situations as described in actions#299.
nijel added a commit to nijel/stale that referenced this issue Feb 4, 2021
When different stale period is used for issues and pull requests, this code uses wrong one.

This was probably missed in actions#224

Fixes actions#299
nijel added a commit to WeblateOrg/meta that referenced this issue Feb 4, 2021
There seems to be a bug in current actions/stale and it uses the default
value for checking actual staleness of an issue. So use the lower value
there. This will make marking PRs as stale earlier, but we don't have
any stale right now. Hopefully it will get properly fixed in the action.

See actions/stale#304
See actions/stale#299
@nijel
Copy link
Contributor Author

nijel commented Feb 4, 2021

It turns out to be caused by not properly working issue/pr delays.

  • The log shows days-before-issue-stale
  • The code actually uses days-before-stale to check the staleness

I've changed the perameters in WeblateOrg/meta@761741d to use the shorter period in days-before-stale and extend it in days-before-pr-stale and now the issue is correctly marked as stale (it would also mark as stale PRs which we don't want to get marked as stale, but luckily we don't have any right now):

[#4746] Found issue: issue #4746 last updated 2021-01-06T08:51:34Z (is pr? false)
[#4746] Days before issue stale: 10
[#4746] This issue hasn't a stale label
[#4746] Marking issue stale because it was last updated on 2021-01-06T08:51:34Z and it does not have a stale label
[#4746] Marking issue #4746 as stale
[#4746] Found a stale issue
[#4746] Checking for label on issue #4746
[#4746] Issue #4746 marked stale on: 2021-02-04T09:36:26Z
[#4746] Checking for comments on issue #4746 since 2021-02-04T09:36:26Z
[#4746] Comments not made by actor or another bot: 0
[#4746] Issue #4746 has been commented on: false
[#4746] Days before issue close: 4
[#4746] Issue #4746 has been updated: true
[#4746] Stale issue is not old enough to close yet (hasComments? false, hasUpdate? true)

Should be fixed by #304

nijel pushed a commit to nijel/stale that referenced this issue Feb 4, 2021
@hross hross closed this as completed in #304 Feb 5, 2021
hross pushed a commit that referenced this issue Feb 5, 2021
* Fixed should be stale condition

When different stale period is used for issues and pull requests, this code uses wrong one.

This was probably missed in #224

Fixes #299

* Add tests for #299

Co-authored-by: Geoffrey Testelin <geoffrey.testelin@gmail.com>
hross pushed a commit that referenced this issue Feb 5, 2021
This might help to understand some situations as described in #299.
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

Successfully merging a pull request may close this issue.

1 participant