Skip to content

Commit 36c85ab

Browse files
committed
ci: add license checker
1 parent 61ad4cc commit 36c85ab

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Check Licenses
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["*"]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
check_licenses:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Base Setup
19+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
20+
21+
- name: Check Licenses
22+
run: jlpm check-licenses
23+

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"build:labextension:dev": "jupyter labextension build --development True .",
3737
"build:lib": "tsc --sourceMap",
3838
"build:lib:prod": "tsc",
39+
"check-licenses": "license-checker-rseidelsohn --onlyAllow 'MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;0BSD;CC0-1.0;Python-2.0;CC-BY-3.0;CC-BY-4.0;Unlicense;BlueOak-1.0.0;(MIT OR Apache-2.0);(MIT AND BSD-3-Clause);(Apache-2.0 OR MIT);(BSD-2-Clause OR MIT OR Apache-2.0);(MIT OR CC0-1.0);(MIT AND CC-BY-3.0);(Unlicense OR Apache-2.0)'",
3940
"clean": "jlpm clean:lib",
4041
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
4142
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
@@ -78,6 +79,7 @@
7879
"eslint-config-prettier": "^8.8.0",
7980
"eslint-plugin-prettier": "^5.0.0",
8081
"jest": "^29.2.0",
82+
"license-checker-rseidelsohn": "^4.4.2",
8183
"mkdirp": "^1.0.3",
8284
"npm-run-all2": "^7.0.1",
8385
"prettier": "^3.0.0",
@@ -208,5 +210,6 @@
208210
"selector-no-vendor-prefix": null,
209211
"value-no-vendor-prefix": null
210212
}
211-
}
213+
},
214+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
212215
}

0 commit comments

Comments
 (0)