UNPKG

wgutils

Version:

Tools for managing working groups

25 lines 893 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.run = exports.options = void 0; const index_js_1 = require("./index.js"); const config_js_1 = require("../config.js"); function options(yargs) { return yargs .positional("pr", { type: "number", demandOption: true }) .positional("hash", { type: "string", demandOption: true }) .example("$0 <pr> <hash>", "Returns success if PR #<pr> at hash <hash> meets the automerge requirements"); } exports.options = options; async function run(args) { const config = await (0, config_js_1.loadConfig)(); try { await (0, index_js_1.checkPr)(config, args.pr, args.hash); } catch (e) { const err = e instanceof Error ? e : new Error(String(e)); console.error(err.message); process.exit(1); } } exports.run = run; //# sourceMappingURL=cli.js.map