mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
Refactor the existing classes of configuration errors into their own file; consolidate the place we check for configuration errors into `codeql.ts`, where the actual command invocations happen. Also, rename the `UserError` type to `ConfigurationError` to standardize on a single term.
16 lines
505 B
JavaScript
Generated
16 lines
505 B
JavaScript
Generated
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.parseRepositoryNwo = void 0;
|
|
const util_1 = require("./util");
|
|
function parseRepositoryNwo(input) {
|
|
const parts = input.split("/");
|
|
if (parts.length !== 2) {
|
|
throw new util_1.ConfigurationError(`"${input}" is not a valid repository name`);
|
|
}
|
|
return {
|
|
owner: parts[0],
|
|
repo: parts[1],
|
|
};
|
|
}
|
|
exports.parseRepositoryNwo = parseRepositoryNwo;
|
|
//# sourceMappingURL=repository.js.map
|