UNPKG

@dapplion/benchmark

Version:

Ensures that new code does not introduce performance regressions with CI. Tracks:

17 lines (16 loc) 559 B
import { getDefaultBranch } from "../utils/defaultBranch.js"; export async function resolveShouldPersist(opts, branch) { // Force persist if (opts.persist === true) return true; // Do not persist if (opts.persist === false) return false; // User provides exact list of branches if (opts.persistBranches) { return opts.persistBranches.includes(branch); } // Default to only persist the default branch const repoDefaultBranch = await getDefaultBranch(opts); return branch === repoDefaultBranch; }