Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1010 Bytes

File metadata and controls

42 lines (33 loc) · 1010 Bytes
name example route scope type
Get the code of conduct for a repository
octokit.rest.codesOfConduct.getForRepo({ owner, repo })
GET /repos/{owner}/{repo}/community/code_of_conduct
codesOfConduct
API method

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.rest.codesOfConduct.getForRepo({
  owner,
  repo,
});

Parameters

name required description
owneryes
repoyes

See also: GitHub Developer Guide documentation.