UNPKG

@dapplion/benchmark

Version:

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

20 lines (19 loc) 709 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveShouldPersist = resolveShouldPersist; const defaultBranch_js_1 = require("../utils/defaultBranch.js"); 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 (0, defaultBranch_js_1.getDefaultBranch)(opts); return branch === repoDefaultBranch; }