Get all codes of conduct

octokit.codesOfConduct.getAllCodesOfConduct();

Parameters

This endpoint has no parameters

See also: GitHub Developer Guide documentation.

Get a code of conduct

octokit.codesOfConduct.getConductCode({
key,
});

Parameters

namerequireddescription
keyyes

See also: GitHub Developer Guide documentation.

Get the code of conduct for a repository

Returns the contents of the repository's code of conduct file, if one is detected.

A code of conduct is detected if there is a file named CODE_OF_CONDUCT in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.

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

Parameters

namerequireddescription
owneryes
repoyes

See also: GitHub Developer Guide documentation.