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 |
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,
});
name | required | description |
---|---|---|
owner | yes | |
repo | yes |
See also: GitHub Developer Guide documentation.