Skip to content
Latchkey

Issue Inactive workflow (element-plus/element-plus)

The Issue Inactive workflow from element-plus/element-plus, 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: element-plus/element-plus.github/workflows/issue-inactive.ymlLicense MITView source

What it does

This is the Issue Inactive workflow from the element-plus/element-plus 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 Inactive

on:
  schedule:
    # GMT+8 00:00
    - cron: '0 16 * * *'

jobs:
  close-issues:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    if: ${{ github.repository_owner == 'element-plus' }}
    steps:
      - name: need reproduction
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'close-issues'
          labels: 'need reproduction'
          inactive-day: 3

      - name: needs more info
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'close-issues'
          labels: 'needs more info'
          inactive-day: 3
          body: |
            Since the issue was labeled with `needs-more-info`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
            由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

  lock-issues:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    if: ${{ github.repository_owner == 'element-plus' }}
    steps:
      - name: lock-issues
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'lock-issues'
          token: ${{ secrets.GITHUB_TOKEN }}
          issue-state: closed
          labels: 'inactive'
          inactive-day: 30

  check-inactive:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    if: ${{ github.repository_owner == 'element-plus' }}
    steps:
      - name: check-inactive
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'check-inactive'
          inactive-day: 30
          exclude-issue-numbers: '15834'

The same workflow, on Latchkey

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

name: Issue Inactive
 
on:
  schedule:
    # GMT+8 00:00
    - cron: '0 16 * * *'
 
jobs:
  close-issues:
    timeout-minutes: 30
    runs-on: latchkey-small
    permissions:
      issues: write
    if: ${{ github.repository_owner == 'element-plus' }}
    steps:
      - name: need reproduction
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'close-issues'
          labels: 'need reproduction'
          inactive-day: 3
 
      - name: needs more info
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'close-issues'
          labels: 'needs more info'
          inactive-day: 3
          body: |
            Since the issue was labeled with `needs-more-info`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
            由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
 
  lock-issues:
    timeout-minutes: 30
    runs-on: latchkey-small
    permissions:
      issues: write
    if: ${{ github.repository_owner == 'element-plus' }}
    steps:
      - name: lock-issues
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'lock-issues'
          token: ${{ secrets.GITHUB_TOKEN }}
          issue-state: closed
          labels: 'inactive'
          inactive-day: 30
 
  check-inactive:
    timeout-minutes: 30
    runs-on: latchkey-small
    permissions:
      issues: write
    if: ${{ github.repository_owner == 'element-plus' }}
    steps:
      - name: check-inactive
        uses: actions-cool/issues-helper-backup@d65454423c6fbbd20026b9b499d403f79422ac69
        with:
          actions: 'check-inactive'
          inactive-day: 30
          exclude-issue-numbers: '15834'
 

What changed

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