Skip to content

Commit e3f31b8

Browse files
octokitbotgr2m
authored andcommitted
WIP octokit/routes updated
1 parent 57f9cba commit e3f31b8

File tree

4 files changed

+161
-18
lines changed

4 files changed

+161
-18
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,17 @@ octokit.repos.deleteRelease({ owner, repo, release_id });
19721972
// https://developer.github.com/v3/repos/releases/#list-assets-for-a-release
19731973
octokit.repos.listAssetsForRelease({ owner, repo, release_id });
19741974

1975+
// https://developer.github.com/v3/repos/releases/#upload-a-release-asset
1976+
octokit.repos.uploadReleaseAsset({
1977+
owner,
1978+
repo,
1979+
release_id,
1980+
name,
1981+
label,
1982+
data,
1983+
origin
1984+
});
1985+
19751986
// https://developer.github.com/v3/activity/starring/#list-stargazers
19761987
octokit.activity.listStargazersForRepo({ owner, repo });
19771988

scripts/update-endpoints/generated/endpoints.json

Lines changed: 141 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
"url": "/app/installations/{installation_id}/access_tokens",
219219
"isDeprecated": false,
220220
"isLegacy": false,
221-
"description": "Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token.\n\nBy default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThis example grants the token \"Read and write\" permission to `issues` and \"Read\" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269.",
221+
"description": "Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.\n\nYou must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.\n\nThis example grants the token \"Read and write\" permission to `issues` and \"Read\" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269.",
222222
"documentationUrl": "https://developer.github.com/v3/apps/#create-a-new-installation-token",
223223
"previews": [{ "name": "machine-man" }],
224224
"headers": [
@@ -4648,9 +4648,9 @@
46484648
"parameters": [
46494649
{
46504650
"name": "since",
4651-
"description": "The integer ID of the last Organization that you've seen.",
4651+
"description": "The integer ID of the last organization that you've seen.",
46524652
"in": "QUERY",
4653-
"type": "string",
4653+
"type": "integer",
46544654
"required": false,
46554655
"enum": null,
46564656
"allowNull": false,
@@ -4732,7 +4732,7 @@
47324732
"description": "response",
47334733
"examples": [
47344734
{
4735-
"data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_settings\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}"
4735+
"data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_permission\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}"
47364736
},
47374737
{
47384738
"data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"plan\":{\"name\":\"team\",\"space\":976562499,\"private_repos\":999999,\"filled_seats\":4,\"seats\":5}}"
@@ -4957,7 +4957,7 @@
49574957
"description": "response",
49584958
"examples": [
49594959
{
4960-
"data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_settings\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}"
4960+
"data": "{\"login\":\"github\",\"id\":1,\"node_id\":\"MDEyOk9yZ2FuaXphdGlvbjE=\",\"url\":\"https://api.github.com/orgs/github\",\"repos_url\":\"https://api.github.com/orgs/github/repos\",\"events_url\":\"https://api.github.com/orgs/github/events\",\"hooks_url\":\"https://api.github.com/orgs/github/hooks\",\"issues_url\":\"https://api.github.com/orgs/github/issues\",\"members_url\":\"https://api.github.com/orgs/github/members{/member}\",\"public_members_url\":\"https://api.github.com/orgs/github/public_members{/member}\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"description\":\"A great organization\",\"name\":\"github\",\"company\":\"GitHub\",\"blog\":\"https://github.com/blog\",\"location\":\"San Francisco\",\"email\":\"octocat@github.com\",\"is_verified\":true,\"has_organization_projects\":true,\"has_repository_projects\":true,\"public_repos\":2,\"public_gists\":1,\"followers\":20,\"following\":0,\"html_url\":\"https://github.com/octocat\",\"created_at\":\"2008-01-14T04:33:35Z\",\"type\":\"Organization\",\"total_private_repos\":100,\"owned_private_repos\":100,\"private_gists\":81,\"disk_usage\":10000,\"collaborators\":8,\"billing_email\":\"support@github.com\",\"plan\":{\"name\":\"Medium\",\"space\":400,\"private_repos\":20},\"default_repository_permission\":\"read\",\"members_can_create_repositories\":true,\"two_factor_requirement_enabled\":true,\"members_allowed_repository_creation_type\":\"all\",\"members_can_create_public_repositories\":false,\"members_can_create_private_repositories\":false,\"members_can_create_internal_repositories\":false}"
49614961
}
49624962
]
49634963
}
@@ -35853,6 +35853,140 @@
3585335853
],
3585435854
"renamed": null
3585535855
},
35856+
{
35857+
"name": "Upload a release asset",
35858+
"scope": "repos",
35859+
"id": "uploadReleaseAsset",
35860+
"method": "POST",
35861+
"url": "{origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",
35862+
"isDeprecated": false,
35863+
"isLegacy": false,
35864+
"description": "This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in the response of the [Create a release endpoint](https://developer.github.com/v3/repos/releases/#create-a-release) to upload a release asset.\n\nYou need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.\n\nMost libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example:\n\n`application/zip`\n\nGitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset.\n\n**Notes:**\n\n* GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The \"[List assets for a release](https://developer.github.com/v3/repos/releases/#list-assets-for-a-release)\" endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://github.com/contact).\n* If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.\n\nThis may leave an empty asset with a state of `starter`. It can be safely deleted.",
35865+
"documentationUrl": "https://developer.github.com/v3/repos/releases/#upload-a-release-asset",
35866+
"previews": [],
35867+
"headers": [
35868+
{ "name": "content-length", "value": null },
35869+
{ "name": "content-type", "value": null }
35870+
],
35871+
"parameters": [
35872+
{
35873+
"name": "owner",
35874+
"description": "owner parameter",
35875+
"in": "PATH",
35876+
"type": "string",
35877+
"required": true,
35878+
"enum": null,
35879+
"allowNull": false,
35880+
"mapToData": null,
35881+
"validation": null,
35882+
"alias": null,
35883+
"deprecated": null
35884+
},
35885+
{
35886+
"name": "repo",
35887+
"description": "repo parameter",
35888+
"in": "PATH",
35889+
"type": "string",
35890+
"required": true,
35891+
"enum": null,
35892+
"allowNull": false,
35893+
"mapToData": null,
35894+
"validation": null,
35895+
"alias": null,
35896+
"deprecated": null
35897+
},
35898+
{
35899+
"name": "release_id",
35900+
"description": "release_id parameter",
35901+
"in": "PATH",
35902+
"type": "integer",
35903+
"required": true,
35904+
"enum": null,
35905+
"allowNull": false,
35906+
"mapToData": null,
35907+
"validation": null,
35908+
"alias": null,
35909+
"deprecated": null
35910+
},
35911+
{
35912+
"name": "name",
35913+
"description": "name parameter",
35914+
"in": "QUERY",
35915+
"type": "string",
35916+
"required": false,
35917+
"enum": null,
35918+
"allowNull": false,
35919+
"mapToData": null,
35920+
"validation": null,
35921+
"alias": null,
35922+
"deprecated": null
35923+
},
35924+
{
35925+
"name": "label",
35926+
"description": "label parameter",
35927+
"in": "QUERY",
35928+
"type": "string",
35929+
"required": false,
35930+
"enum": null,
35931+
"allowNull": false,
35932+
"mapToData": null,
35933+
"validation": null,
35934+
"alias": null,
35935+
"deprecated": null
35936+
},
35937+
{
35938+
"name": "data",
35939+
"description": "The raw file data",
35940+
"in": "BODY",
35941+
"type": "string",
35942+
"required": true,
35943+
"enum": null,
35944+
"allowNull": false,
35945+
"mapToData": true,
35946+
"validation": null,
35947+
"alias": null,
35948+
"deprecated": null
35949+
},
35950+
{
35951+
"name": "origin",
35952+
"description": "The URL origin (protocol + host name + port) is included in `upload_url` returned in the response of the \"Create a release\" endpoint",
35953+
"in": "PATH",
35954+
"type": "string",
35955+
"required": null,
35956+
"enum": null,
35957+
"allowNull": null,
35958+
"mapToData": null,
35959+
"validation": null,
35960+
"alias": null,
35961+
"deprecated": null
35962+
},
35963+
{
35964+
"name": "file",
35965+
"description": null,
35966+
"in": null,
35967+
"type": null,
35968+
"required": null,
35969+
"enum": null,
35970+
"allowNull": null,
35971+
"mapToData": null,
35972+
"validation": null,
35973+
"alias": "data",
35974+
"deprecated": true
35975+
}
35976+
],
35977+
"responses": [
35978+
{
35979+
"code": 201,
35980+
"description": "Response for successful upload",
35981+
"examples": [
35982+
{
35983+
"data": "{\"url\":\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\"browser_download_url\":\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\"id\":1,\"node_id\":\"MDEyOlJlbGVhc2VBc3NldDE=\",\"name\":\"example.zip\",\"label\":\"short description\",\"state\":\"uploaded\",\"content_type\":\"application/zip\",\"size\":1024,\"download_count\":42,\"created_at\":\"2013-02-27T19:35:32Z\",\"updated_at\":\"2013-02-27T19:35:32Z\",\"uploader\":{\"login\":\"octocat\",\"id\":1,\"node_id\":\"MDQ6VXNlcjE=\",\"avatar_url\":\"https://github.com/images/error/octocat_happy.gif\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/octocat\",\"html_url\":\"https://github.com/octocat\",\"followers_url\":\"https://api.github.com/users/octocat/followers\",\"following_url\":\"https://api.github.com/users/octocat/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/octocat/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/octocat/subscriptions\",\"organizations_url\":\"https://api.github.com/users/octocat/orgs\",\"repos_url\":\"https://api.github.com/users/octocat/repos\",\"events_url\":\"https://api.github.com/users/octocat/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/octocat/received_events\",\"type\":\"User\",\"site_admin\":false}}"
35984+
}
35985+
]
35986+
}
35987+
],
35988+
"renamed": null
35989+
},
3585635990
{
3585735991
"name": "List Stargazers",
3585835992
"scope": "activity",
@@ -37502,9 +37636,9 @@
3750237636
"parameters": [
3750337637
{
3750437638
"name": "since",
37505-
"description": "The integer ID of the last Repository that you've seen.",
37639+
"description": "The integer ID of the last repository that you've seen.",
3750637640
"in": "QUERY",
37507-
"type": "string",
37641+
"type": "integer",
3750837642
"required": false,
3750937643
"enum": null,
3751037644
"allowNull": false,

src/generated/endpoints.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,7 @@ export default {
24372437
params: {
24382438
page: { type: "integer" },
24392439
per_page: { type: "integer" },
2440-
since: { type: "string" }
2440+
since: { type: "integer" }
24412441
},
24422442
url: "/organizations"
24432443
},
@@ -4948,7 +4948,7 @@ export default {
49484948
params: {
49494949
page: { type: "integer" },
49504950
per_page: { type: "integer" },
4951-
since: { type: "string" }
4951+
since: { type: "integer" }
49524952
},
49534953
url: "/repositories"
49544954
},

0 commit comments

Comments
 (0)