Skip to content
Latchkey

Lint PR Title workflow (connectrpc/connect-go)

The Lint PR Title workflow from connectrpc/connect-go, explained and optimized by Latchkey.

C

CI health: C - fair

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: connectrpc/connect-go.github/workflows/pr-title.yamlLicense Apache-2.0View source

What it does

This is the Lint PR Title workflow from the connectrpc/connect-go repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

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

The workflow

workflow (.yml)
name: Lint PR Title
# Prevent writing to the repository using the CI token.
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions:
  pull-requests: read
on:
  pull_request:
    # By default, a workflow only runs when a pull_request's activity type is opened,
    # synchronize, or reopened. We explicity override here so that PR titles are
    # re-linted when the PR text content is edited.
    types:
      - opened
      - edited
      - reopened
      - synchronize
jobs:
  lint:
    uses: bufbuild/base-workflows/.github/workflows/pr-title.yaml@main

The same workflow, on Latchkey

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

name: Lint PR Title
# Prevent writing to the repository using the CI token.
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions:
  pull-requests: read
on:
  pull_request:
    # By default, a workflow only runs when a pull_request's activity type is opened,
    # synchronize, or reopened. We explicity override here so that PR titles are
    # re-linted when the PR text content is edited.
    types:
      - opened
      - edited
      - reopened
      - synchronize
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  lint:
    timeout-minutes: 30
    uses: bufbuild/base-workflows/.github/workflows/pr-title.yaml@main
 

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.