Skip to content

Latest commit

 

History

History
150 lines (137 loc) · 5.01 KB

README.md

File metadata and controls

150 lines (137 loc) · 5.01 KB
← Back to plugins index

📜 Repository licenses

This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.

⚠️ Disclaimer

This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub. All product and company names are trademarks™ or registered® trademarks of their respective holders.

ℹ Additional notes

⚠️ This is NOT legal advice, use at your own risk

💣 This plugin SHOULD NOT be enabled on web instances, since it allows raw command injection. This could result in compromised server!

Supported features
→ Full specification
📘 Repository template
📓 Repositories
🔑 (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)
Permissions, limitations and conditions
Licenses overview

🔎 Licenses analysis

Use to plugin_licenses_setup command to setup project dependencies.

Example: setup a NodeJS project using npm ci

- name: Licenses and permissions
  with:
    repo: metrics
    plugin_licenses: yes
    plugin_licenses_setup: npm ci

Dependencies will be analyzed by GitHub licensed and compared against GitHub known licenses.

⚠️ This is NOT legal advice, use at your own risk

💣 This plugin SHOULD NOT be enabled on web instances, since it allows raw command injection. This could result in compromised server!

➡️ Available options

OptionDescription

plugin_licenses

Enable licenses plugin

🌐 Web instances must configure settings.json:
  • metrics.cpu.overuse
  • metrics.run.tempdir
  • metrics.run.git
  • metrics.run.licensed
  • metrics.run.user.cmd
type: boolean
default: no

plugin_licenses_setup

Setup command

ℹ️ Depending on the project, this may not be required. The example command is intended for NodeJs projects that use npm to install their dependencies.

type: string

plugin_licenses_ratio

Used licenses ratio

type: boolean
default: no

plugin_licenses_legal

Permissions, limitations and conditions about used licenses

type: boolean
default: yes

ℹ️ Examples workflows

name: Licenses and permissions
with:
  filename: metrics.plugin.licenses.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  template: repository
  repo: metrics
  plugin_licenses: yes
  plugin_licenses_setup: bash -c '[[ -f package.json ]] && npm ci || true'
name: Licenses with open-source ratio graphs
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.licenses.ratio.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  template: repository
  repo: metrics
  plugin_licenses: yes
  plugin_licenses_setup: bash -c '[[ -f package.json ]] && npm ci || true'
  plugin_licenses_legal: no
  plugin_licenses_ratio: yes