Skip to content

fix(typescript): description updates #314

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

Merged
merged 1 commit into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/codesOfConduct/getForRepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ type: API method

# Get the code of conduct for a repository

This method returns the contents of the repository's code of conduct file, if one is detected.
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.

```js
octokit.codesOfConduct.getForRepo({
Expand Down
6 changes: 6 additions & 0 deletions docs/repos/getCommunityProfileMetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ overall health score, repository description, the presence of documentation, det
code of conduct, detected license, and the presence of ISSUE_TEMPLATE, PULL_REQUEST_TEMPLATE,
README, and CONTRIBUTING files.

The `health_percentage` score is defined as a percentage of how many of
these four documents are present: README, CONTRIBUTING, LICENSE, and
CODE_OF_CONDUCT. For example, if all four documents are present, then
the `health_percentage` is `100`. If only one is present, then the
`health_percentage` is `25`.

`content_reports_enabled` is only returned for organization-owned repositories.

```js
Expand Down
4 changes: 2 additions & 2 deletions scripts/update-endpoints/generated/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -10559,7 +10559,7 @@
"url": "/repos/{owner}/{repo}/community/code_of_conduct",
"isDeprecated": false,
"deprecationDate": null,
"description": "This method returns the contents of the repository's code of conduct file, if one is detected.",
"description": "Returns the contents of the repository's code of conduct file, if one is detected.\n\nA 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.",
"documentationUrl": "https://docs.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository",
"previews": [{ "name": "scarlet-witch" }],
"headers": [],
Expand Down Expand Up @@ -35073,7 +35073,7 @@
"url": "/repos/{owner}/{repo}/community/profile",
"isDeprecated": false,
"deprecationDate": null,
"description": "This endpoint will return all community profile metrics, including an\noverall health score, repository description, the presence of documentation, detected\ncode of conduct, detected license, and the presence of ISSUE\\_TEMPLATE, PULL\\_REQUEST\\_TEMPLATE,\nREADME, and CONTRIBUTING files.\n\n`content_reports_enabled` is only returned for organization-owned repositories.",
"description": "This endpoint will return all community profile metrics, including an\noverall health score, repository description, the presence of documentation, detected\ncode of conduct, detected license, and the presence of ISSUE\\_TEMPLATE, PULL\\_REQUEST\\_TEMPLATE,\nREADME, and CONTRIBUTING files.\n\nThe `health_percentage` score is defined as a percentage of how many of\nthese four documents are present: README, CONTRIBUTING, LICENSE, and\nCODE_OF_CONDUCT. For example, if all four documents are present, then\nthe `health_percentage` is `100`. If only one is present, then the\n`health_percentage` is `25`.\n\n`content_reports_enabled` is only returned for organization-owned repositories.",
"documentationUrl": "https://docs.github.com/rest/reference/repos#get-community-profile-metrics",
"previews": [],
"headers": [],
Expand Down
10 changes: 9 additions & 1 deletion src/generated/method-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2166,7 +2166,9 @@ export type RestEndpointMethods = {
endpoint: EndpointInterface<{ url: string }>;
};
/**
* This method returns the contents of the repository's code of conduct file, if one is detected.
* 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.
*/
getForRepo: {
(
Expand Down Expand Up @@ -5958,6 +5960,12 @@ export type RestEndpointMethods = {
* code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
* README, and CONTRIBUTING files.
*
* The `health_percentage` score is defined as a percentage of how many of
* these four documents are present: README, CONTRIBUTING, LICENSE, and
* CODE_OF_CONDUCT. For example, if all four documents are present, then
* the `health_percentage` is `100`. If only one is present, then the
* `health_percentage` is `25`.
*
* `content_reports_enabled` is only returned for organization-owned repositories.
*/
getCommunityProfileMetrics: {
Expand Down