A github action to comment on newly added packages to package.json
or requirements.txt
files like this:
Configuration:
- Create a github workflow file (.github/workflows)
- Configure a job to check licenses:
CheckLicenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check licenses of new packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: oncai/check-licenses@v1
with:
dependency-file: path/to/package.json
message-file: ./new-package-warning.md
- Add a markdown Mustache template to be used for comments. E.g.
new-package-warning.md
:
New package: **{{name}}**
version: **{{version}}**
license: **{{license}}**
homepage: {{{homepage}}}