Examples

Creating a check run in GitHub Actions

import { createGithub } from "@anabranch/check-runs-github";

const checkRuns = createGithub({
  token: process.env.GITHUB_TOKEN!,
  owner: "my-org",
  repo: "my-repo",
});

const checkRun = await checkRuns
  .create("CI", process.env.GITHUB_SHA!)
  .run();

await checkRuns.start(checkRun).run();

// Do work...

await checkRuns.complete(checkRun, "success", {
  title: "All checks passed",
  summary: "Build and tests completed successfully",
}).run();