OCA / oca-addons-repo-template

OCA Repository Template
MIT License
61 stars 89 forks source link

Conflicting stale/needs more information in stale configuration #247

Closed SirAionTech closed 6 months ago

SirAionTech commented 6 months ago

Module

No module.

Describe the bug

The issue https://github.com/OCA/l10n-italy/issues/3268 is labeled as https://github.com/OCA/l10n-italy/labels/needs%20more%20information but is still open after months. The https://github.com/OCA/l10n-italy/labels/stale label is added/removed every month: image

To Reproduce

The configuration only differs from the template's one (https://github.com/OCA/oca-addons-repo-template/blob/9c473ce89e20b088bd10cf00cac344c10b6e21fa/.github/workflows/stale.yml) for the operations-per-run but it should not affect the behavior:

name: Mark stale issues and pull requests

on:
  schedule:
    - cron: "0 12 * * 0"

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - name: Stale PRs and issues policy
        uses: actions/stale@v4
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          # General settings.
          ascending: true
          remove-stale-when-updated: true
          # Pull Requests settings.
          # 120+30 day stale policy for PRs
          # * Except PRs marked as "no stale"
          days-before-pr-stale: 120
          days-before-pr-close: 30
          exempt-pr-labels: "no stale"
          stale-pr-label: "stale"
          stale-pr-message: >
            There hasn't been any activity on this pull request in the past 4 months, so
            it has been marked as stale and it will be closed automatically if no
            further activity occurs in the next 30 days.

            If you want this PR to never become stale, please ask a PSC member to apply
            the "no stale" label.
          # Issues settings.
          # 180+30 day stale policy for open issues
          # * Except Issues marked as "no stale"
          days-before-issue-stale: 180
          days-before-issue-close: 30
          exempt-issue-labels: "no stale,needs more information"
          stale-issue-label: "stale"
          stale-issue-message: >
            There hasn't been any activity on this issue in the past 6 months, so it has
            been marked as stale and it will be closed automatically if no further
            activity occurs in the next 30 days.

            If you want this issue to never become stale, please ask a PSC member to
            apply the "no stale" label.
          operations-per-run: 200

      # 15+30 day stale policy for issues pending more information
      # * Issues that are pending more information
      # * Except Issues marked as "no stale"
      - name: Needs more information stale issues policy
        uses: actions/stale@v4
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          ascending: true
          only-labels: "needs more information"
          exempt-issue-labels: "no stale"
          days-before-stale: 15
          days-before-close: 30
          days-before-pr-stale: -1
          days-before-pr-close: -1
          remove-stale-when-updated: true
          stale-issue-label: "stale"
          stale-issue-message: >
            This issue needs more information and there hasn't been any activity
            recently, so it has been marked as stale and it will be closed automatically
            if no further activity occurs in the next 30 days.

            If you think this is a mistake, please ask a PSC member to remove the "needs
            more information" label.

The last comment was on January 4th.

Expected behavior The issue should have been closed on February 18th (15+30 days after January 4th).

Additional context

Relevant log of latest run (https://github.com/OCA/l10n-italy/actions/runs/8315382413/job/22753685678): from stale configuration:

[#3268] Issue #3268
  [#3268] Found this issue last updated at: 2024-02-25T12:24:29Z
  [#3268] The option only-labels (​[https://github.com/actions/stale#only-labels​)](https://github.com/actions/stale#only-labels%E2%80%8B)) was not specified
  [#3268] └── Continuing the process for this issue
  [#3268] Days before issue stale: 180
  [#3268] The issue is not closed nor locked. Trying to remove the close label...
  [#3268] ├── The close-issue-label (​[https://github.com/actions/stale#close-issue-label​)](https://github.com/actions/stale#close-issue-label%E2%80%8B)) option was not set
  [#3268] └── Skipping the removal of the close label
  [#3268] This issue hasn't a stale label
  [#3268] Skipping this issue because it has an exempt label

from needs more information configuration:

[#3268] Issue #3268
  [#3268] Found this issue last updated at: 2024-02-25T12:24:29Z
  [#3268] The option only-labels (​[https://github.com/actions/stale#only-labels​)](https://github.com/actions/stale#only-labels%E2%80%8B)) was specified to only process issues and pull requests with all those labels (1)
  [#3268] ├── All the required labels are present on this issue
  [#3268] └── Continuing the process for this issue
  [#3268] Days before issue stale: 15
  [#3268] The issue is not closed nor locked. Trying to remove the close label...
  [#3268] ├── The close-issue-label (​[https://github.com/actions/stale#close-issue-label​)](https://github.com/actions/stale#close-issue-label%E2%80%8B)) option was not set
  [#3268] └── Skipping the removal of the close label
  [#3268] This issue hasn't a stale label
  [#3268] The option any-of-labels (​[https://github.com/actions/stale#any-of-labels​)](https://github.com/actions/stale#any-of-labels%E2%80%8B)) was not specified
  [#3268] └── Continuing the process for this issue
  [#3268] This issue has no milestone
  [#3268] └── Skip the milestones checks
  [#3268] This issue has no assignee
  [#3268] └── Skip the assignees checks
  [#3268] This issue is not stale
  [#3268] The option ignore-updates (​[https://github.com/actions/stale#ignore-updates​)](https://github.com/actions/stale#ignore-updates%E2%80%8B)) is disabled. The stale counter will take into account updates and comments on this issue to avoid to stale when there is some update
  [#3268] This issue should be stale based on the last update date the 25-02-2024 (2024-02-25T12:24:29Z)
  [#3268] This issue should be marked as stale based on the option days-before-stale (​[https://github.com/actions/stale#days-before-stale​)](https://github.com/actions/stale#days-before-stale%E2%80%8B)) (15)
  [#3268] Marking this issue as stale
  [#3268] This issue is now stale
  [#3268] This issue is already stale
  [#3268] Checking for label on this issue
  [#3268] Issue marked stale on: 2024-03-17T12:25:43Z
  [#3268] Checking for comments on issue since: 2024-03-17T12:25:43Z
  [#3268] Comments that are not the stale comment or another bot: 0
  [#3268] Issue has been commented on: false
  [#3268] Days before issue close: 30
  [#3268] Issue has been updated: true
  [#3268] The option remove-stale-when-updated (​[https://github.com/actions/stale#remove-stale-when-updated​)](https://github.com/actions/stale#remove-stale-when-updated%E2%80%8B)) is: true
  [#3268] The stale label should not be removed
  [#3268] Stale issue is not old enough to close yet (hasComments? false, hasUpdate? true)
  [#3268] 4 operations consumed for this issue
SirAionTech commented 6 months ago

Maybe the needs more information configuration should apply a different label instead of stale?

yajo commented 6 months ago

Seems a dupe of https://github.com/actions/stale/issues/690 and probably the fix is just to upgrade the action version (it's quite outdated right now)

SirAionTech commented 6 months ago

Seems a dupe of actions/stale#690 and probably the fix is just to upgrade the action version (it's quite outdated right now)

Thanks for finding that reference, I thought we just had misconfigured the action