Skip to content
Latchkey

Issue Stale workflow (chakra-ui/chakra-ui)

The Issue Stale workflow from chakra-ui/chakra-ui, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: chakra-ui/chakra-ui.github/workflows/issue-stale.ymlLicense MITView source

What it does

This is the Issue Stale workflow from the chakra-ui/chakra-ui repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Issue Stale
on:
  workflow_dispatch:
  schedule:
    - cron: "0 1 * * *"

permissions:
  issues: write
  pull-requests: write
  actions: write

jobs:
  issues:
    runs-on: ubuntu-latest
    if: github.repository_owner == 'chakra-ui'
    steps:
      - uses: actions/stale@v10
        name: "Close stale issues"
        with:
          repo-token: ${{ secrets.SAGE_PAT }}
          close-issue-message:
            "This issue has been automatically closed due to inactivity. If you
            believe this closure was in error, please reopen the issue or add a
            comment. Thanks for your understanding.\n\nNote: This is an
            automated message."
          days-before-issue-close: 7
          days-before-issue-stale: 30
          stale-pr-label: "stale"
          stale-issue-label: "stale"
          days-before-pr-close: 7
          days-before-pr-stale: 15
          only-pr-labels:
            "postpone: more info or changes requested, please add a reproduction"
          exempt-issue-labels: "roadmap,feature,bug"
          operations-per-run: 200

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Issue Stale
on:
  workflow_dispatch:
  schedule:
    - cron: "0 1 * * *"
 
permissions:
  issues: write
  pull-requests: write
  actions: write
 
jobs:
  issues:
    timeout-minutes: 30
    runs-on: latchkey-small
    if: github.repository_owner == 'chakra-ui'
    steps:
      - uses: actions/stale@v10
        name: "Close stale issues"
        with:
          repo-token: ${{ secrets.SAGE_PAT }}
          close-issue-message:
            "This issue has been automatically closed due to inactivity. If you
            believe this closure was in error, please reopen the issue or add a
            comment. Thanks for your understanding.\n\nNote: This is an
            automated message."
          days-before-issue-close: 7
          days-before-issue-stale: 30
          stale-pr-label: "stale"
          stale-issue-label: "stale"
          days-before-pr-close: 7
          days-before-pr-stale: 15
          only-pr-labels:
            "postpone: more info or changes requested, please add a reproduction"
          exempt-issue-labels: "roadmap,feature,bug"
          operations-per-run: 200
 

What changed

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow