redline.yml

Thin caller installed verbatim as .github/workflows/redline.yml in every onboarded GitHub repo.

The only gate file an onboarded GitHub repository owns: a thin workflow that calls the reusable gate on every pull request with this repository's settings.

Lands at.github/workflows/redline.yml
Put there byredline init, from this file with <org>, the ADR threshold, the dependency-severity floor, the soft-fail labels, the rung and the stand-down list filled in. With --gate-source local it points at the vendored ./.github/workflows/redline-gate.yml instead of <org>/.github.
Editing this fileLive — redline init writes from this file

What to know

  • Runs on pull_request: opened, synchronize, reopened, edited, labeled, unlabeled and ready_for_review — edited and the label events matter because the checklist and exemptions are read from the body and labels.
  • The job id is redline-gate, and it is load-bearing: the required check redline-gate / gate is this job id plus the gate's aggregate job id. Renaming either makes the required check unreportable and blocks every pull request. scripts/validate.mjs fails CI if this template's job id changes.

Changing it

This template. redline init renders it into each repository, so a hand edit in an onboarded repository is overwritten the next time redline init runs there.

The full checklist is on Changing a template.

The full file

templates/redline.yml · 36 lines · 1.2 KB
# Managed by Redline. Regenerate with `redline init`; edits here are overwritten.
#
# Keep the job id `redline-gate`: the branch ruleset requires the check
# `redline-gate / gate`, which is built from this id. Renaming it makes that
# check unreportable.

name: Redline

on:
  pull_request:
    types: [opened, synchronize, reopened, edited, labeled, unlabeled, ready_for_review]

permissions:
  contents: read
  pull-requests: write

concurrency:
  group: redline-${{ github.event.pull_request.number }}
  cancel-in-progress: true

jobs:
  redline-gate:
    uses: <org>/.github/.github/workflows/redline-gate.yml@main
    with:
      adr-diff-threshold: 300
      fail-on-dependency-severity: high
      soft-fail-labels: redline-exempt,redline-sync
      # Written by `redline init --rung`. observe reports without blocking;
      # block-blocker and block-high stop a merge. The security floor — dependency
      # review and the secret scan — is not on this ladder and blocks at every rung.
      rung: observe
      # Gate jobs another tool in this repository already covers, written by
      # `redline init` from the tools you declared. A stood-down job is skipped
      # and the aggregate reads a skip as a pass. Empty runs every job.
      stand-down: ''