Skip to content
Latchkey

Issue Manager workflow (jazzband/django-model-utils)

The Issue Manager workflow from jazzband/django-model-utils, explained and optimized by Latchkey.

B

CI health: B - good

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

Grade your own workflow free or run it on Latchkey →
Source: jazzband/django-model-utils.github/workflows/issue-manager.ymlLicense BSD-3-ClauseView source

What it does

This is the Issue Manager workflow from the jazzband/django-model-utils repository, a real project running GitHub Actions. It is shown here with attribution under its BSD-3-Clause license.

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

The workflow

workflow (.yml)
# Automatically close issues or pull requests that have a label, after a custom delay, if no one replies.
# https://github.com/tiangolo/issue-manager
name: Issue Manager

on:
  schedule:
    - cron: "12 0 * * *"
  issue_comment:
    types:
      - created
  issues:
    types:
      - labeled
  pull_request_target:
    types:
      - labeled
  workflow_dispatch:

jobs:
  issue-manager:
    # Disables this workflow from running in a repository that is not part of the indicated organization/user
    if: github.repository_owner == 'jazzband'

    runs-on: ubuntu-latest
    steps:
      - uses: tiangolo/issue-manager@0.5.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          config: >
            {
              "answered": {
                "delay": 864000,
                "message": "Assuming the question was answered, this will be automatically closed now."
              },
              "solved": {
                "delay": 864000,
                "message": "Assuming the original issue was solved, it will be automatically closed now."
              },
              "waiting": {
                "delay": 864000,
                "message": "Automatically closing after waiting for additional info. To re-open, please provide the additional information requested."
              },
              "wontfix": {
                "delay": 864000,
                "message": "As discussed, we won't be implementing this. Automatically closing."
              }
            }

The same workflow, on Latchkey

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

# Automatically close issues or pull requests that have a label, after a custom delay, if no one replies.
# https://github.com/tiangolo/issue-manager
name: Issue Manager
 
on:
  schedule:
    - cron: "12 0 * * *"
  issue_comment:
    types:
      - created
  issues:
    types:
      - labeled
  pull_request_target:
    types:
      - labeled
  workflow_dispatch:
 
jobs:
  issue-manager:
    timeout-minutes: 30
    # Disables this workflow from running in a repository that is not part of the indicated organization/user
    if: github.repository_owner == 'jazzband'
 
    runs-on: latchkey-small
    steps:
      - uses: tiangolo/issue-manager@0.5.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          config: >
            {
              "answered": {
                "delay": 864000,
                "message": "Assuming the question was answered, this will be automatically closed now."
              },
              "solved": {
                "delay": 864000,
                "message": "Assuming the original issue was solved, it will be automatically closed now."
              },
              "waiting": {
                "delay": 864000,
                "message": "Automatically closing after waiting for additional info. To re-open, please provide the additional information requested."
              },
              "wontfix": {
                "delay": 864000,
                "message": "As discussed, we won't be implementing this. Automatically closing."
              }
            }
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

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