Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom license categories #99

Merged
merged 2 commits into from
Apr 13, 2023
Merged

Conversation

gabidobo
Copy link
Member

This PR adds support for new user-defined categories, and moving licenses between the default categories.

Updates:

  • there are now two types of licence categories:
    • build-in, "default" categories (Public Domain, Permissive, Weakly Protective, Strongly Protective, Network Protective, Uncategorized)
    • user-defined categories
  • users can define categories in the license policy:
{
  "audit": {
    "licensePolicy": {
      "categories": [
        {
          "name": "Permissive",
          "licenses": ["CC-BY-3.0"]
        }
      ],
      "high": ["cat:Network Protective", "cat:Strongly Protective"],
      "moderate": ["cat:Weakly Protective"]
    }
  }
}
  • default category names are reserved
  • when using a default category name, users re-assign licenses from their default classification
  • the example above moves the CC-BY-3.0 license from the default Uncategorized to Permissive
  • within the default categories, a license can only be assigned to a single category
  • a license can belong to multiple user categories
  • user-defined categories can also be used to generate issues, via the cat:NAME reference under the proper severity array in the license policy
  • licenses don't have types anymore, but categories and names - the default licenses.json db has been updated accordingly

Closes #98

@gabidobo gabidobo self-assigned this Apr 12, 2023
@gabidobo gabidobo linked an issue Apr 12, 2023 that may be closed by this pull request
@andreimarinescu andreimarinescu merged commit 0f473cc into main Apr 13, 2023
@andreimarinescu andreimarinescu deleted the 98-custom-license-categories branch April 13, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom license categories
2 participants