Fix bug with protocol prefixes
This commit is contained in:
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@@ -1069,6 +1069,10 @@ function getScorecardLevels(changes) {
|
||||
const version = change.version;
|
||||
//Get the project repository
|
||||
let repositoryUrl = change.source_repository_url;
|
||||
//If the repository_url includes the protocol, remove it
|
||||
if (repositoryUrl === null || repositoryUrl === void 0 ? void 0 : repositoryUrl.startsWith('https://')) {
|
||||
repositoryUrl = repositoryUrl.replace('https://', '');
|
||||
}
|
||||
// If GitHub API doesn't have the repository URL, query deps.dev for it.
|
||||
if (repositoryUrl === null ||
|
||||
repositoryUrl === undefined ||
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -20,6 +20,11 @@ export async function getScorecardLevels(
|
||||
|
||||
//Get the project repository
|
||||
let repositoryUrl = change.source_repository_url
|
||||
//If the repository_url includes the protocol, remove it
|
||||
if (repositoryUrl?.startsWith('https://')) {
|
||||
repositoryUrl = repositoryUrl.replace('https://', '')
|
||||
}
|
||||
|
||||
// If GitHub API doesn't have the repository URL, query deps.dev for it.
|
||||
if (
|
||||
repositoryUrl === null ||
|
||||
|
||||
Reference in New Issue
Block a user