Get a license

octokit.licenses.get({
license,
});

Parameters

namerequireddescription
licenseyes

See also: GitHub Developer Guide documentation.

Get all commonly used licenses

octokit.licenses.getAllCommonlyUsed();

Parameters

namerequireddescription
featuredno
per_pageno

Results per page (max 100)

See also: GitHub Developer Guide documentation.

Get the license for a repository

This method returns the contents of the repository's license file, if one is detected.

Similar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.

octokit.licenses.getForRepo({
owner,
repo,
});

Parameters

namerequireddescription
owneryes
repoyes

See also: GitHub Developer Guide documentation.