Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bbfa034e7 | |||
| 26f1ad9120 | |||
| 152d8e2def | |||
| b99756ecd3 | |||
| fde92acd08 |
+2
-2
@@ -351,7 +351,7 @@ function getInvalidLicenseChanges(changes, licenses) {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const { allow, deny } = licenses;
|
const { allow, deny } = licenses;
|
||||||
const licenseExclusions = (_a = licenses.licenseExclusions) === null || _a === void 0 ? void 0 : _a.map((pkgUrl) => {
|
const licenseExclusions = (_a = licenses.licenseExclusions) === null || _a === void 0 ? void 0 : _a.map((pkgUrl) => {
|
||||||
return packageurl_js_1.PackageURL.fromString(pkgUrl);
|
return packageurl_js_1.PackageURL.fromString(encodeURI(pkgUrl));
|
||||||
});
|
});
|
||||||
const groupedChanges = yield groupChanges(changes);
|
const groupedChanges = yield groupChanges(changes);
|
||||||
// Takes the changes from the groupedChanges object and filters out the ones that are part of the exclusions list
|
// Takes the changes from the groupedChanges object and filters out the ones that are part of the exclusions list
|
||||||
@@ -360,7 +360,7 @@ function getInvalidLicenseChanges(changes, licenses) {
|
|||||||
if (change.package_url.length === 0) {
|
if (change.package_url.length === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const changeAsPackageURL = packageurl_js_1.PackageURL.fromString(change.package_url);
|
const changeAsPackageURL = packageurl_js_1.PackageURL.fromString(encodeURI(change.package_url));
|
||||||
// We want to find if the licenseExclussion list contains the PackageURL of the Change
|
// We want to find if the licenseExclussion list contains the PackageURL of the Change
|
||||||
// If it does, we want to filter it out and therefore return false
|
// If it does, we want to filter it out and therefore return false
|
||||||
// If it doesn't, we want to keep it and therefore return true
|
// If it doesn't, we want to keep it and therefore return true
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "dependency-review-action",
|
"name": "dependency-review-action",
|
||||||
"version": "3.1.2",
|
"version": "3.1.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "dependency-review-action",
|
"name": "dependency-review-action",
|
||||||
"version": "3.1.2",
|
"version": "3.1.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dependency-review-action",
|
"name": "dependency-review-action",
|
||||||
"version": "3.1.2",
|
"version": "3.1.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A GitHub Action for Dependency Review",
|
"description": "A GitHub Action for Dependency Review",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
|
|||||||
+4
-2
@@ -32,7 +32,7 @@ export async function getInvalidLicenseChanges(
|
|||||||
const {allow, deny} = licenses
|
const {allow, deny} = licenses
|
||||||
const licenseExclusions = licenses.licenseExclusions?.map(
|
const licenseExclusions = licenses.licenseExclusions?.map(
|
||||||
(pkgUrl: string) => {
|
(pkgUrl: string) => {
|
||||||
return PackageURL.fromString(pkgUrl)
|
return PackageURL.fromString(encodeURI(pkgUrl))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -45,7 +45,9 @@ export async function getInvalidLicenseChanges(
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeAsPackageURL = PackageURL.fromString(change.package_url)
|
const changeAsPackageURL = PackageURL.fromString(
|
||||||
|
encodeURI(change.package_url)
|
||||||
|
)
|
||||||
|
|
||||||
// We want to find if the licenseExclussion list contains the PackageURL of the Change
|
// We want to find if the licenseExclussion list contains the PackageURL of the Change
|
||||||
// If it does, we want to filter it out and therefore return false
|
// If it does, we want to filter it out and therefore return false
|
||||||
|
|||||||
Reference in New Issue
Block a user