@xliic/cicd-core-node
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -130,3 +130,2 @@ "use strict"; | ||
function matchTaskConfig(reference, config, logger) { | ||
var _a; | ||
if (reference.branch) { | ||
@@ -138,4 +137,7 @@ return findTaskConfig(reference.branch, config === null || config === void 0 ? void 0 : config.branches, "branch", logger); | ||
} | ||
else if (reference.pr) { | ||
return findTaskConfig(reference.pr.target, config === null || config === void 0 ? void 0 : config.prs, "prs", logger); | ||
} | ||
else { | ||
return (_a = config === null || config === void 0 ? void 0 : config.prs) !== null && _a !== void 0 ? _a : {}; | ||
throw new Error("No branch, tag or PR is known"); | ||
} | ||
@@ -142,0 +144,0 @@ } |
@@ -21,3 +21,6 @@ { | ||
"prs": { | ||
"$ref": "#/definitions/auditConfig" | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/auditConfig" | ||
} | ||
} | ||
@@ -24,0 +27,0 @@ }, |
@@ -173,3 +173,6 @@ export declare type Result<R, E> = [R, undefined] | [undefined, E]; | ||
tag?: string; | ||
pr?: string; | ||
pr?: { | ||
id: string; | ||
target: string; | ||
}; | ||
}; | ||
@@ -176,0 +179,0 @@ export interface TaskOptions { |
@@ -18,3 +18,3 @@ "use strict"; | ||
const tag = reference.tag ? `Tag:${reference.tag}` : ""; | ||
const pr = reference.pr ? `PR:${reference.pr}` : ""; | ||
const pr = reference.pr ? `PR:${reference.pr.id}` : ""; | ||
const replaced = template | ||
@@ -38,3 +38,3 @@ .replace("${repo_hostname}", repoHost) | ||
else { | ||
return `${repo}@@PR:${reference.pr}`; | ||
return `${repo}@@PR:${reference.pr.id}`; | ||
} | ||
@@ -41,0 +41,0 @@ // TODO check max name len |
{ | ||
"name": "@xliic/cicd-core-node", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99657
2319