Skip to content

Commit 08de8fe

Browse files
authored
fix(typescript): description updates (#314)
1 parent b641391 commit 08de8fe

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

docs/codesOfConduct/getForRepo.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ type: API method
88

99
# Get the code of conduct for a repository
1010

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

1315
```js
1416
octokit.codesOfConduct.getForRepo({

docs/repos/getCommunityProfileMetrics.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ overall health score, repository description, the presence of documentation, det
1313
code of conduct, detected license, and the presence of ISSUE_TEMPLATE, PULL_REQUEST_TEMPLATE,
1414
README, and CONTRIBUTING files.
1515

16+
The `health_percentage` score is defined as a percentage of how many of
17+
these four documents are present: README, CONTRIBUTING, LICENSE, and
18+
CODE_OF_CONDUCT. For example, if all four documents are present, then
19+
the `health_percentage` is `100`. If only one is present, then the
20+
`health_percentage` is `25`.
21+
1622
`content_reports_enabled` is only returned for organization-owned repositories.
1723

1824
```js

scripts/update-endpoints/generated/endpoints.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10559,7 +10559,7 @@
1055910559
"url": "/repos/{owner}/{repo}/community/code_of_conduct",
1056010560
"isDeprecated": false,
1056110561
"deprecationDate": null,
10562-
"description": "This method returns the contents of the repository's code of conduct file, if one is detected.",
10562+
"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.",
1056310563
"documentationUrl": "https://docs.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository",
1056410564
"previews": [{ "name": "scarlet-witch" }],
1056510565
"headers": [],
@@ -35073,7 +35073,7 @@
3507335073
"url": "/repos/{owner}/{repo}/community/profile",
3507435074
"isDeprecated": false,
3507535075
"deprecationDate": null,
35076-
"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.",
35076+
"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.",
3507735077
"documentationUrl": "https://docs.github.com/rest/reference/repos#get-community-profile-metrics",
3507835078
"previews": [],
3507935079
"headers": [],

src/generated/method-types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2166,7 +2166,9 @@ export type RestEndpointMethods = {
21662166
endpoint: EndpointInterface<{ url: string }>;
21672167
};
21682168
/**
2169-
* This method returns the contents of the repository's code of conduct file, if one is detected.
2169+
* Returns the contents of the repository's code of conduct file, if one is detected.
2170+
*
2171+
* 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.
21702172
*/
21712173
getForRepo: {
21722174
(
@@ -5958,6 +5960,12 @@ export type RestEndpointMethods = {
59585960
* code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
59595961
* README, and CONTRIBUTING files.
59605962
*
5963+
* The `health_percentage` score is defined as a percentage of how many of
5964+
* these four documents are present: README, CONTRIBUTING, LICENSE, and
5965+
* CODE_OF_CONDUCT. For example, if all four documents are present, then
5966+
* the `health_percentage` is `100`. If only one is present, then the
5967+
* `health_percentage` is `25`.
5968+
*
59615969
* `content_reports_enabled` is only returned for organization-owned repositories.
59625970
*/
59635971
getCommunityProfileMetrics: {

0 commit comments

Comments
 (0)