name: Close issues without context permissions: issues: write on: issues: types: [ labeled ] jobs: close-lock: name: Close and lock issues if: contains(github.event.issue.labels.*.name, 'bot:close') && github.event.issue.state == 'open' runs-on: ubuntu-latest steps: - name: Close id: close uses: actions/stale@v8.0.0 with: days-before-issue-stale: -1 days-before-issue-close: 0 stale-issue-label: bot:close close-issue-label: insufficient information close-issue-message: >- This description omits all, or critical parts of the information requested by maintainers to be able to reproduce the issue: - the **complete** log history of your Elastic components, including `setup`. - any change(s) performed to the docker-elk configuration. - details about the runtime environment, for both Docker and Compose. Therefore, this issue will now be **closed**. Please open a new issue and fill in the template. It saves everyone's efforts, and allows maintainers to provide you with a solution in as few round trips as possible. Thank you for your understanding. :pray: # Due to eventual consistency, listing closed issues immediately after a # close does not always yield the expected results. A sleep is a simple # enough remediation to this issue. - name: Pause if: fromJson(steps.close.outputs.closed-issues-prs)[0] run: sleep 5 - name: Lock uses: dessant/lock-threads@v5 if: fromJson(steps.close.outputs.closed-issues-prs)[0] with: process-only: issues issue-inactive-days: 0 include-any-issue-labels: bot:close remove-issue-labels: bot:close issue-lock-reason: spam log-output: true