Skip to content

A Github action that detects new dependencies in PRs and adds reminder comments to review licensing details

License

Notifications You must be signed in to change notification settings

oncai/check-licenses

Repository files navigation

Check new package licenses

A github action to comment on newly added packages to package.json or requirements.txt files like this:

image

Configuration:

  1. Create a github workflow file (.github/workflows)
  2. 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
  1. 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}}}

About

A Github action that detects new dependencies in PRs and adds reminder comments to review licensing details

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published