Skip to content
Latchkey

Stale Issues & PRs workflow (supabase/supabase-py)

The Stale Issues & PRs workflow from supabase/supabase-py, 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: supabase/supabase-py.github/workflows/stale.ymlLicense MITView source

What it does

This is the Stale Issues & PRs workflow from the supabase/supabase-py 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: Stale Issues & PRs

on:
  schedule:
    - cron: '0 0 * * *'

permissions:
  issues: write
  pull-requests: write
  contents: write

jobs:
  mark_stale:
    name: Mark issues and PRs as Stale
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
        with:
          days-before-pr-stale: 365
          days-before-pr-close: -1
          days-before-issue-stale: 365
          days-before-issue-close: -1
          stale-issue-message: >
            This issue is stale because it has been open for 365 days with no activity.
          stale-pr-message: >
            This pull request is stale because it has been open for 365 days with no activity.
          close-issue-message: >
            This issue has been marked as stale and closed due to inactivity.
          close-pr-message: >
            This pull request has been marked as stale and closed due to inactivity.

The same workflow, on Latchkey

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

name: Stale Issues & PRs
 
on:
  schedule:
    - cron: '0 0 * * *'
 
permissions:
  issues: write
  pull-requests: write
  contents: write
 
jobs:
  mark_stale:
    timeout-minutes: 30
    name: Mark issues and PRs as Stale
    runs-on: latchkey-small
    steps:
      - uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
        with:
          days-before-pr-stale: 365
          days-before-pr-close: -1
          days-before-issue-stale: 365
          days-before-issue-close: -1
          stale-issue-message: >
            This issue is stale because it has been open for 365 days with no activity.
          stale-pr-message: >
            This pull request is stale because it has been open for 365 days with no activity.
          close-issue-message: >
            This issue has been marked as stale and closed due to inactivity.
          close-pr-message: >
            This pull request has been marked as stale and closed due to inactivity.
 

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