Skip to content

Commit

Permalink
feat: GET /repos/{owner}/{repo}/autolinks (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot committed Aug 2, 2021
1 parent cb4c4c2 commit a61fb95
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.22.0"
"@octokit/types": "^6.23.0"
},
"peerDependencies": {
"@octokit/core": ">=2"
Expand Down
61 changes: 61 additions & 0 deletions scripts/update-endpoints/generated/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -8573,6 +8573,23 @@
}
]
},
{
"url": "/repos/{owner}/{repo}/autolinks",
"id": "create-autolink",
"scope": "repos",
"documentationUrl": "https://docs.github.com/v3/repos#create-an-autolink",
"renamed": null,
"responses": [
{
"code": 201,
"schema": "{\"title\":\"Autolink reference\",\"description\":\"An autolink reference.\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"example\":3},\"key_prefix\":{\"description\":\"The prefix of a key that is linkified.\",\"example\":\"TICKET-\",\"type\":\"string\"},\"url_template\":{\"description\":\"A template for the target URL that is generated if a key was found.\",\"example\":\"https://example.com/TICKET?query=<num>\",\"type\":\"string\"}},\"required\":[\"id\",\"key_prefix\",\"url_template\"]}"
},
{
"code": 422,
"schema": "{\"title\":\"Validation Error\",\"description\":\"Validation Error\",\"type\":\"object\",\"required\":[\"message\",\"documentation_url\"],\"properties\":{\"message\":{\"type\":\"string\"},\"documentation_url\":{\"type\":\"string\"},\"errors\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"required\":[\"code\"],\"properties\":{\"resource\":{\"type\":\"string\"},\"field\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"},\"code\":{\"type\":\"string\"},\"index\":{\"type\":\"integer\"},\"value\":{\"oneOf\":[{\"type\":\"string\",\"nullable\":true},{\"type\":\"integer\",\"nullable\":true},{\"type\":\"array\",\"nullable\":true,\"items\":{\"type\":\"string\"}}]}}}}}}"
}
]
},
{
"url": "/repos/{owner}/{repo}/commits/{commit_sha}/comments",
"id": "create-commit-comment",
Expand Down Expand Up @@ -8991,6 +9008,20 @@
"renamed": null,
"responses": [{ "code": 204, "schema": null }]
},
{
"url": "/repos/{owner}/{repo}/autolinks/{autolink_id}",
"id": "delete-autolink",
"scope": "repos",
"documentationUrl": "https://docs.github.com/v3/repos#delete-autolink",
"renamed": null,
"responses": [
{ "code": 204, "schema": null },
{
"code": 404,
"schema": "{\"title\":\"Basic Error\",\"description\":\"Basic Error\",\"type\":\"object\",\"properties\":{\"message\":{\"type\":\"string\"},\"documentation_url\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}"
}
]
},
{
"url": "/repos/{owner}/{repo}/branches/{branch}/protection",
"id": "delete-branch-protection",
Expand Down Expand Up @@ -9349,6 +9380,23 @@
}
]
},
{
"url": "/repos/{owner}/{repo}/autolinks/{autolink_id}",
"id": "get-autolink",
"scope": "repos",
"documentationUrl": "https://docs.github.com/v3/repos#get-autolink",
"renamed": null,
"responses": [
{
"code": 200,
"schema": "{\"title\":\"Autolink reference\",\"description\":\"An autolink reference.\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"example\":3},\"key_prefix\":{\"description\":\"The prefix of a key that is linkified.\",\"example\":\"TICKET-\",\"type\":\"string\"},\"url_template\":{\"description\":\"A template for the target URL that is generated if a key was found.\",\"example\":\"https://example.com/TICKET?query=<num>\",\"type\":\"string\"}},\"required\":[\"id\",\"key_prefix\",\"url_template\"]}"
},
{
"code": 404,
"schema": "{\"title\":\"Basic Error\",\"description\":\"Basic Error\",\"type\":\"object\",\"properties\":{\"message\":{\"type\":\"string\"},\"documentation_url\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}"
}
]
},
{
"url": "/repos/{owner}/{repo}/branches/{branch}",
"id": "get-branch",
Expand Down Expand Up @@ -10031,6 +10079,19 @@
}
]
},
{
"url": "/repos/{owner}/{repo}/autolinks",
"id": "list-autolinks",
"scope": "repos",
"documentationUrl": "https://docs.github.com/v3/repos#list-autolinks",
"renamed": null,
"responses": [
{
"code": 200,
"schema": "{\"type\":\"array\",\"items\":{\"title\":\"Autolink reference\",\"description\":\"An autolink reference.\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"integer\",\"example\":3},\"key_prefix\":{\"description\":\"The prefix of a key that is linkified.\",\"example\":\"TICKET-\",\"type\":\"string\"},\"url_template\":{\"description\":\"A template for the target URL that is generated if a key was found.\",\"example\":\"https://example.com/TICKET?query=<num>\",\"type\":\"string\"}},\"required\":[\"id\",\"key_prefix\",\"url_template\"]}}"
}
]
},
{
"url": "/repos/{owner}/{repo}/branches",
"id": "list-branches",
Expand Down
9 changes: 9 additions & 0 deletions src/generated/paginating-endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,14 @@ export interface PaginatingEndpoints {
response: Endpoints["GET /repos/{owner}/{repo}/assignees"]["response"];
};

/**
* @see https://docs.github.com/v3/repos#list-autolinks
*/
"GET /repos/{owner}/{repo}/autolinks": {
parameters: Endpoints["GET /repos/{owner}/{repo}/autolinks"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/autolinks"]["response"];
};

/**
* @see https://docs.github.com/rest/reference/repos#list-branches
*/
Expand Down Expand Up @@ -1699,6 +1707,7 @@ export const paginatingEndpoints: (keyof PaginatingEndpoints)[] = [
"GET /repos/{owner}/{repo}/actions/workflows",
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs",
"GET /repos/{owner}/{repo}/assignees",
"GET /repos/{owner}/{repo}/autolinks",
"GET /repos/{owner}/{repo}/branches",
"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations",
"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",
Expand Down

0 comments on commit a61fb95

Please sign in to comment.