Skip to content

Question - Close issues immediately #711

@ReenigneArcher

Description

@ReenigneArcher

Describe your issue

Is it possible to use this action to immediately close issues, with no stale period?

The documentation doesn't describe this scenario.

Further context

I add a label added or fixed to issues when the issue is resolved in a non default branch. Once I make a release I want to automatically close those issues. Instead of running on a schedule, I was thinking I could run this on a published release event.

This is my best guess at a workflow, but I'm thinking it won't work as I'm intending (maybe it will?).

name: Close Added/Fixed Issues

on:
  release:
    types: [published]

jobs:
  close_issues:
    name: Check Issues / PRs
    runs-on: ubuntu-latest
    steps:
      - name: Close Issues (added/fixed)
        uses: actions/stale@v3
        with:
          only-issues-labels: 'added,fixed'
          close-issue-message: >
            This is now available in the latest release.
          close-issue-label: 'released'
          days-before-issue-stale: 0
          days-before-issue-close: 0
          ignore-updates: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions