GitHub Actions · Setup guide

Give issues and PRs
a starting label.

Classify GitHub issues and pull requests with the Jev model through Vercel AI Gateway. Deploy the API, add a workflow, and automatically label new issues and PRs.

Choose your instructions

01 / Connect

Set up your repository

  1. Deploy the API

    Use the deploy button above. Set LABELER_API_KEY in the deployment environment to a secret of your choice. The API uses Vercel AI Gateway with Vercel OIDC, or an AI_GATEWAY_API_KEY you configure.

  2. Add your Actions configuration

    In the repository you want to label, open Settings → Secrets and variables → Actions.

    VariableLABELER_URLYour deployment base URL, such as https://your-app.vercel.app, without /api/classify-issue.

    SecretLABELER_API_KEYThe same secret you set in your deployment.

  3. Add the workflow

    Copy an example below into .github/workflows/classify-issues.yml and commit it to your default branch.

02 / Automate

Copy your workflow

The standard example uses labels such as bug, enhancement, and documentation. Choose custom labels to edit the label names and descriptions sent to the labeler.

name: Classify issues

on:
  issues:
    types: [opened]

permissions:
  issues: write

jobs:
  classify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/github-script@v8
        env:
          LABELER_URL: ${{ vars.LABELER_URL }}
          LABELER_API_KEY: ${{ secrets.LABELER_API_KEY }}
        with:
          script: |
            const { title, body } = context.payload.issue;
            const classifierUrl = new URL("/api/classify-issue", process.env.LABELER_URL);
            const response = await fetch(classifierUrl, {
              method: "POST",
              headers: {
                "Content-Type": "application/json",
                Authorization: `Bearer ${process.env.LABELER_API_KEY}`,
              },
              body: JSON.stringify({ title, body }),
              signal: AbortSignal.timeout(60000),
            });
            if (!response.ok) {
              throw new Error(`Labeler returned HTTP ${response.status}`);
            }
            const { classification } = await response.json();
            await github.rest.issues.addLabels({
              ...context.repo,
              issue_number: context.issue.number,
              labels: [classification],
            });

For custom labels, include a labels object mapping label names to descriptions in the JSON body. The API chooses from those labels.

{
  "title": "The save button does nothing",
  "body": "Clicking Save leaves my changes unsaved.",
  "labels": {
    "bug": "Broken behavior",
    "enhancement": "New functionality"
  }
}

03 / Verify

Open an issue to try it

The workflow sends the issue title and body to POST /api/classify-issue and adds the returned label. Existing labels stay in place. Check the run in your repository's Actions tab.

If a run fails, confirm the endpoint URL and matching secrets. An HTTP 401 means the API secret did not match; 502 means classification failed.