Skip to content

Commit ffde3d5

Browse files
committed
Update licenses plugin
1 parent 4d3dbe4 commit ffde3d5

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

source/plugins/licenses/index.mjs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,10 @@ export default async function({login, q, imports, data, graphql, queries, accoun
5757
//Spawn licensed process
5858
console.debug(`metrics/compute/${login}/plugins > licenses > running licensed`)
5959
try {
60-
console.log(await imports.run("npm list --production --all", {cwd:path}))
60+
console.debug(await imports.run("npm list --production --all", {cwd:path}))
6161
}
6262
catch (error) {
63-
console.log(error)
64-
}
65-
try {
66-
console.log(await imports.run("licensed list --format=json --licenses", {cwd:path}))
67-
}
68-
catch (error) {
69-
console.log(error)
63+
console.debug(error)
7064
}
7165
JSON.parse(await imports.run("licensed list --format=json --licenses", {cwd:path})).apps
7266
.map(({sources}) => sources?.flatMap(source => source.dependencies?.map(({dependency, license}) => {

source/plugins/licenses/tests.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#- name: Licenses plugin (complete)
2-
# uses: lowlighter/metrics@latest
3-
# with:
4-
# token: MOCKED_TOKEN
5-
# template: repository
6-
# repo: metrics
7-
# plugin_licenses: yes
8-
# plugin_licenses_setup: npm ci
9-
# plugin_licenses_ratio: yes
10-
# plugin_licenses_legal: yes
11-
# timeout: 1800000
12-
# modes:
13-
# - action
1+
- name: Licenses plugin (complete)
2+
uses: lowlighter/metrics@latest
3+
with:
4+
token: MOCKED_TOKEN
5+
template: repository
6+
repo: metrics
7+
plugin_licenses: yes
8+
plugin_licenses_setup: npm ci
9+
plugin_licenses_ratio: yes
10+
plugin_licenses_legal: yes
11+
timeout: 1800000
12+
modes:
13+
- action

0 commit comments

Comments
 (0)