Allow usage of www.github.com

This commit is contained in:
Nora
2023-02-01 11:34:49 +00:00
parent 72412c92c8
commit 4c54778515
2 changed files with 7 additions and 1 deletions

View File

@@ -51,7 +51,11 @@ function getNwoOrOwnerFromGitHubUrl(
): string | undefined {
try {
let paths: string[];
if (githubUrl.split("/")[0] === "github.com") {
const urlElements = githubUrl.split("/");
if (
urlElements[0] === "github.com" ||
urlElements[0] === "www.github.com"
) {
paths = githubUrl.split("/").slice(1);
} else {
const uri = new URL(githubUrl);