mirror of
https://github.com/github/codeql-action.git
synced 2026-05-06 22:00:39 +00:00
Make the default github.com path consistent with other paths
On util.ts:223, there is the following comment: ``` // Normalise path to having a trailing slash for consistency ``` However, I notice that the path defined by `GITHUB_DOTCOM_URL` does not have a trailing slash. This PR fixes it.
This commit is contained in:
Generated
+1
-1
@@ -17,7 +17,7 @@ const apiCompatibility = __importStar(require("./api-compatibility.json"));
|
||||
/**
|
||||
* The URL for github.com.
|
||||
*/
|
||||
exports.GITHUB_DOTCOM_URL = "https://github.com";
|
||||
exports.GITHUB_DOTCOM_URL = "https://github.com/";
|
||||
/**
|
||||
* Get the extra options for the codeql commands.
|
||||
*/
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Generated
+4
-4
@@ -103,10 +103,10 @@ ava_1.default("getExtraOptionsEnvParam() fails on invalid JSON", (t) => {
|
||||
process.env.CODEQL_ACTION_EXTRA_OPTIONS = origExtraOptions;
|
||||
});
|
||||
ava_1.default("parseGithubUrl", (t) => {
|
||||
t.deepEqual(util.parseGithubUrl("github.com"), "https://github.com");
|
||||
t.deepEqual(util.parseGithubUrl("https://github.com"), "https://github.com");
|
||||
t.deepEqual(util.parseGithubUrl("https://api.github.com"), "https://github.com");
|
||||
t.deepEqual(util.parseGithubUrl("https://github.com/foo/bar"), "https://github.com");
|
||||
t.deepEqual(util.parseGithubUrl("github.com"), "https://github.com/");
|
||||
t.deepEqual(util.parseGithubUrl("https://github.com"), "https://github.com/");
|
||||
t.deepEqual(util.parseGithubUrl("https://api.github.com/"), "https://github.com/");
|
||||
t.deepEqual(util.parseGithubUrl("https://github.com/foo/bar"), "https://github.com/");
|
||||
t.deepEqual(util.parseGithubUrl("github.example.com"), "https://github.example.com/");
|
||||
t.deepEqual(util.parseGithubUrl("https://github.example.com"), "https://github.example.com/");
|
||||
t.deepEqual(util.parseGithubUrl("https://api.github.example.com"), "https://github.example.com/");
|
||||
|
||||
File diff suppressed because one or more lines are too long
+5
-5
@@ -126,15 +126,15 @@ test("getExtraOptionsEnvParam() fails on invalid JSON", (t) => {
|
||||
});
|
||||
|
||||
test("parseGithubUrl", (t) => {
|
||||
t.deepEqual(util.parseGithubUrl("github.com"), "https://github.com");
|
||||
t.deepEqual(util.parseGithubUrl("https://github.com"), "https://github.com");
|
||||
t.deepEqual(util.parseGithubUrl("github.com"), "https://github.com/");
|
||||
t.deepEqual(util.parseGithubUrl("https://github.com"), "https://github.com/");
|
||||
t.deepEqual(
|
||||
util.parseGithubUrl("https://api.github.com"),
|
||||
"https://github.com"
|
||||
util.parseGithubUrl("https://api.github.com/"),
|
||||
"https://github.com/"
|
||||
);
|
||||
t.deepEqual(
|
||||
util.parseGithubUrl("https://github.com/foo/bar"),
|
||||
"https://github.com"
|
||||
"https://github.com/"
|
||||
);
|
||||
|
||||
t.deepEqual(
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ export type Mode = "actions" | "runner";
|
||||
/**
|
||||
* The URL for github.com.
|
||||
*/
|
||||
export const GITHUB_DOTCOM_URL = "https://github.com";
|
||||
export const GITHUB_DOTCOM_URL = "https://github.com/";
|
||||
|
||||
/**
|
||||
* Get the extra options for the codeql commands.
|
||||
|
||||
Reference in New Issue
Block a user