Skip to content
Latchkey

Auto Label Issues workflow (langchain-ai/langsmith-sdk)

The Auto Label Issues workflow from langchain-ai/langsmith-sdk, 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: langchain-ai/langsmith-sdk.github/workflows/auto-label-issues.ymlLicense MITView source

What it does

This is the Auto Label Issues workflow from the langchain-ai/langsmith-sdk 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: Auto Label Issues

on:
  issues:
    types: [opened]

permissions: {}

jobs:
  auto-label:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    steps:
      - name: Add SDK label
        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
        with:
          script: |
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['sdk']
            })

The same workflow, on Latchkey

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

name: Auto Label Issues
 
on:
  issues:
    types: [opened]
 
permissions: {}
 
jobs:
  auto-label:
    timeout-minutes: 30
    runs-on: latchkey-small
    permissions:
      issues: write
    steps:
      - name: Add SDK label
        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
        with:
          script: |
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['sdk']
            })
 

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