Convert GitHub variant to an enum.

This commit is contained in:
Chris Gavin 2021-02-15 09:29:10 +00:00
parent 0656b2c1ad
commit c9ca4ec1bd
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
24 changed files with 67 additions and 52 deletions

View file

@ -28,12 +28,12 @@ ava_1.default("validateSarifFileSchema - invalid", (t) => {
});
ava_1.default("validate correct payload used per version", async (t) => {
const newVersions = [
{ type: "dotcom" },
{ type: "ghes", version: "3.1.0" },
{ type: util_1.GitHubVariant.DOTCOM },
{ type: util_1.GitHubVariant.GHES, version: "3.1.0" },
];
const oldVersions = [
{ type: "ghes", version: "2.22.1" },
{ type: "ghes", version: "3.0.0" },
{ type: util_1.GitHubVariant.GHES, version: "2.22.1" },
{ type: util_1.GitHubVariant.GHES, version: "3.0.0" },
];
const allVersions = newVersions.concat(oldVersions);
process.env["GITHUB_EVENT_NAME"] = "push";