From f234adff8e19c11c739ecfdc24d8d31cd9211c7a Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Wed, 9 Jun 2021 13:52:18 -0400 Subject: [PATCH] feat: update `{App, Installation}#permissions` with additional permissions, add `changes` property to `RepositoryRenamedEvent`, `ReleaseAsset#label` can be `null`, `Installation#suspended_{at, by}` are always present (#499) * fix: add `discussions` permission to `App` * feat: add `changes` property to `RepositoryRenamedEvent` * fix: `ReleaseAsset#label` can be `null` * fix: `Installation#suspended_{at, by}` are always present * fix: update app & installation permissions * build: generate types --- payload-examples/api.github.com/index.json | 162 +++++++++++++++++- .../installation/created.payload.json | 4 +- .../created.with-requester.payload.json | 4 +- .../installation/deleted.payload.json | 4 +- .../added.payload.json | 4 +- .../removed.payload.json | 4 +- .../repository/renamed.payload.json | 142 +++++++++++++++ .../api.github.com/common/app.schema.json | 24 ++- .../common/installation.schema.json | 19 +- .../common/release-asset.schema.json | 2 +- .../repository/renamed.schema.json | 24 ++- payload-types/schema.d.ts | 38 ++-- 12 files changed, 400 insertions(+), 31 deletions(-) create mode 100644 payload-examples/api.github.com/repository/renamed.payload.json diff --git a/payload-examples/api.github.com/index.json b/payload-examples/api.github.com/index.json index 702d4e109..63c03e83b 100644 --- a/payload-examples/api.github.com/index.json +++ b/payload-examples/api.github.com/index.json @@ -13303,7 +13303,9 @@ "events": [], "created_at": 1557933591, "updated_at": 1557933591, - "single_file_name": null + "single_file_name": null, + "suspended_at": null, + "suspended_by": null }, "repositories": [ { @@ -13383,7 +13385,9 @@ "events": [], "created_at": 1557933591, "updated_at": 1557933591, - "single_file_name": null + "single_file_name": null, + "suspended_at": null, + "suspended_by": null }, "repositories": [ { @@ -13474,7 +13478,9 @@ "events": ["push", "pull_request"], "created_at": 1525109898, "updated_at": 1525109899, - "single_file_name": "config.yml" + "single_file_name": "config.yml", + "suspended_at": null, + "suspended_by": null }, "repositories": [ { @@ -14087,7 +14093,9 @@ "events": [], "created_at": 1557933591, "updated_at": 1557933591, - "single_file_name": null + "single_file_name": null, + "suspended_at": null, + "suspended_by": null }, "repository_selection": "selected", "repositories_added": [ @@ -14180,7 +14188,9 @@ "events": ["push", "pull_request"], "created_at": 1525109898, "updated_at": 1525109899, - "single_file_name": "config.yml" + "single_file_name": "config.yml", + "suspended_at": null, + "suspended_by": null }, "repository_selection": "selected", "repositories_added": [], @@ -54595,6 +54605,148 @@ "site_admin": false } }, + { + "action": "renamed", + "changes": { + "repository": { + "name": { + "from": "Hello-World" + } + } + }, + "repository": { + "id": 186853261, + "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMyNjE=", + "name": "Hello-World", + "full_name": "Octocoders/Hello-World", + "private": false, + "owner": { + "login": "Octocoders", + "id": 38302899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5", + "avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Octocoders", + "html_url": "https://github.com/Octocoders", + "followers_url": "https://api.github.com/users/Octocoders/followers", + "following_url": "https://api.github.com/users/Octocoders/following{/other_user}", + "gists_url": "https://api.github.com/users/Octocoders/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Octocoders/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Octocoders/subscriptions", + "organizations_url": "https://api.github.com/users/Octocoders/orgs", + "repos_url": "https://api.github.com/users/Octocoders/repos", + "events_url": "https://api.github.com/users/Octocoders/events{/privacy}", + "received_events_url": "https://api.github.com/users/Octocoders/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/Octocoders/Hello-World", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/Octocoders/Hello-World", + "forks_url": "https://api.github.com/repos/Octocoders/Hello-World/forks", + "keys_url": "https://api.github.com/repos/Octocoders/Hello-World/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Octocoders/Hello-World/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Octocoders/Hello-World/teams", + "hooks_url": "https://api.github.com/repos/Octocoders/Hello-World/hooks", + "issue_events_url": "https://api.github.com/repos/Octocoders/Hello-World/issues/events{/number}", + "events_url": "https://api.github.com/repos/Octocoders/Hello-World/events", + "assignees_url": "https://api.github.com/repos/Octocoders/Hello-World/assignees{/user}", + "branches_url": "https://api.github.com/repos/Octocoders/Hello-World/branches{/branch}", + "tags_url": "https://api.github.com/repos/Octocoders/Hello-World/tags", + "blobs_url": "https://api.github.com/repos/Octocoders/Hello-World/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Octocoders/Hello-World/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Octocoders/Hello-World/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Octocoders/Hello-World/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Octocoders/Hello-World/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Octocoders/Hello-World/languages", + "stargazers_url": "https://api.github.com/repos/Octocoders/Hello-World/stargazers", + "contributors_url": "https://api.github.com/repos/Octocoders/Hello-World/contributors", + "subscribers_url": "https://api.github.com/repos/Octocoders/Hello-World/subscribers", + "subscription_url": "https://api.github.com/repos/Octocoders/Hello-World/subscription", + "commits_url": "https://api.github.com/repos/Octocoders/Hello-World/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Octocoders/Hello-World/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Octocoders/Hello-World/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Octocoders/Hello-World/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Octocoders/Hello-World/contents/{+path}", + "compare_url": "https://api.github.com/repos/Octocoders/Hello-World/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Octocoders/Hello-World/merges", + "archive_url": "https://api.github.com/repos/Octocoders/Hello-World/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Octocoders/Hello-World/downloads", + "issues_url": "https://api.github.com/repos/Octocoders/Hello-World/issues{/number}", + "pulls_url": "https://api.github.com/repos/Octocoders/Hello-World/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Octocoders/Hello-World/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Octocoders/Hello-World/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Octocoders/Hello-World/labels{/name}", + "releases_url": "https://api.github.com/repos/Octocoders/Hello-World/releases{/id}", + "deployments_url": "https://api.github.com/repos/Octocoders/Hello-World/deployments", + "created_at": "2019-05-15T15:20:42Z", + "updated_at": "2019-05-15T15:20:41Z", + "pushed_at": "2019-05-15T15:20:33Z", + "git_url": "git://github.com/Octocoders/Hello-World.git", + "ssh_url": "git@github.com:Octocoders/Hello-World.git", + "clone_url": "https://github.com/Octocoders/Hello-World.git", + "svn_url": "https://github.com/Octocoders/Hello-World", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "organization": { + "login": "Octocoders", + "id": 38302899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5", + "url": "https://api.github.com/orgs/Octocoders", + "repos_url": "https://api.github.com/orgs/Octocoders/repos", + "events_url": "https://api.github.com/orgs/Octocoders/events", + "hooks_url": "https://api.github.com/orgs/Octocoders/hooks", + "issues_url": "https://api.github.com/orgs/Octocoders/issues", + "members_url": "https://api.github.com/orgs/Octocoders/members{/member}", + "public_members_url": "https://api.github.com/orgs/Octocoders/public_members{/member}", + "avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4", + "description": "" + }, + "installation": { + "id": 1, + "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMQ==" + } + }, { "action": "transferred", "changes": { diff --git a/payload-examples/api.github.com/installation/created.payload.json b/payload-examples/api.github.com/installation/created.payload.json index c9330e7ea..5166cc1d9 100644 --- a/payload-examples/api.github.com/installation/created.payload.json +++ b/payload-examples/api.github.com/installation/created.payload.json @@ -46,7 +46,9 @@ "events": [], "created_at": 1557933591, "updated_at": 1557933591, - "single_file_name": null + "single_file_name": null, + "suspended_at": null, + "suspended_by": null }, "repositories": [ { diff --git a/payload-examples/api.github.com/installation/created.with-requester.payload.json b/payload-examples/api.github.com/installation/created.with-requester.payload.json index 29e66ea8f..fc689f7e2 100644 --- a/payload-examples/api.github.com/installation/created.with-requester.payload.json +++ b/payload-examples/api.github.com/installation/created.with-requester.payload.json @@ -46,7 +46,9 @@ "events": [], "created_at": 1557933591, "updated_at": 1557933591, - "single_file_name": null + "single_file_name": null, + "suspended_at": null, + "suspended_by": null }, "repositories": [ { diff --git a/payload-examples/api.github.com/installation/deleted.payload.json b/payload-examples/api.github.com/installation/deleted.payload.json index 2440b1519..2ba19ea75 100644 --- a/payload-examples/api.github.com/installation/deleted.payload.json +++ b/payload-examples/api.github.com/installation/deleted.payload.json @@ -37,7 +37,9 @@ "events": ["push", "pull_request"], "created_at": 1525109898, "updated_at": 1525109899, - "single_file_name": "config.yml" + "single_file_name": "config.yml", + "suspended_at": null, + "suspended_by": null }, "repositories": [ { diff --git a/payload-examples/api.github.com/installation_repositories/added.payload.json b/payload-examples/api.github.com/installation_repositories/added.payload.json index 843860646..a8d3924e5 100644 --- a/payload-examples/api.github.com/installation_repositories/added.payload.json +++ b/payload-examples/api.github.com/installation_repositories/added.payload.json @@ -46,7 +46,9 @@ "events": [], "created_at": 1557933591, "updated_at": 1557933591, - "single_file_name": null + "single_file_name": null, + "suspended_at": null, + "suspended_by": null }, "repository_selection": "selected", "repositories_added": [ diff --git a/payload-examples/api.github.com/installation_repositories/removed.payload.json b/payload-examples/api.github.com/installation_repositories/removed.payload.json index 022040511..226bfa1d6 100644 --- a/payload-examples/api.github.com/installation_repositories/removed.payload.json +++ b/payload-examples/api.github.com/installation_repositories/removed.payload.json @@ -37,7 +37,9 @@ "events": ["push", "pull_request"], "created_at": 1525109898, "updated_at": 1525109899, - "single_file_name": "config.yml" + "single_file_name": "config.yml", + "suspended_at": null, + "suspended_by": null }, "repository_selection": "selected", "repositories_added": [], diff --git a/payload-examples/api.github.com/repository/renamed.payload.json b/payload-examples/api.github.com/repository/renamed.payload.json new file mode 100644 index 000000000..57bbd32c2 --- /dev/null +++ b/payload-examples/api.github.com/repository/renamed.payload.json @@ -0,0 +1,142 @@ +{ + "action": "renamed", + "changes": { + "repository": { + "name": { + "from": "Hello-World" + } + } + }, + "repository": { + "id": 186853261, + "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMyNjE=", + "name": "Hello-World", + "full_name": "Octocoders/Hello-World", + "private": false, + "owner": { + "login": "Octocoders", + "id": 38302899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5", + "avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Octocoders", + "html_url": "https://github.com/Octocoders", + "followers_url": "https://api.github.com/users/Octocoders/followers", + "following_url": "https://api.github.com/users/Octocoders/following{/other_user}", + "gists_url": "https://api.github.com/users/Octocoders/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Octocoders/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Octocoders/subscriptions", + "organizations_url": "https://api.github.com/users/Octocoders/orgs", + "repos_url": "https://api.github.com/users/Octocoders/repos", + "events_url": "https://api.github.com/users/Octocoders/events{/privacy}", + "received_events_url": "https://api.github.com/users/Octocoders/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/Octocoders/Hello-World", + "description": null, + "fork": true, + "url": "https://api.github.com/repos/Octocoders/Hello-World", + "forks_url": "https://api.github.com/repos/Octocoders/Hello-World/forks", + "keys_url": "https://api.github.com/repos/Octocoders/Hello-World/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Octocoders/Hello-World/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Octocoders/Hello-World/teams", + "hooks_url": "https://api.github.com/repos/Octocoders/Hello-World/hooks", + "issue_events_url": "https://api.github.com/repos/Octocoders/Hello-World/issues/events{/number}", + "events_url": "https://api.github.com/repos/Octocoders/Hello-World/events", + "assignees_url": "https://api.github.com/repos/Octocoders/Hello-World/assignees{/user}", + "branches_url": "https://api.github.com/repos/Octocoders/Hello-World/branches{/branch}", + "tags_url": "https://api.github.com/repos/Octocoders/Hello-World/tags", + "blobs_url": "https://api.github.com/repos/Octocoders/Hello-World/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Octocoders/Hello-World/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Octocoders/Hello-World/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Octocoders/Hello-World/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Octocoders/Hello-World/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Octocoders/Hello-World/languages", + "stargazers_url": "https://api.github.com/repos/Octocoders/Hello-World/stargazers", + "contributors_url": "https://api.github.com/repos/Octocoders/Hello-World/contributors", + "subscribers_url": "https://api.github.com/repos/Octocoders/Hello-World/subscribers", + "subscription_url": "https://api.github.com/repos/Octocoders/Hello-World/subscription", + "commits_url": "https://api.github.com/repos/Octocoders/Hello-World/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Octocoders/Hello-World/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Octocoders/Hello-World/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Octocoders/Hello-World/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Octocoders/Hello-World/contents/{+path}", + "compare_url": "https://api.github.com/repos/Octocoders/Hello-World/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Octocoders/Hello-World/merges", + "archive_url": "https://api.github.com/repos/Octocoders/Hello-World/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Octocoders/Hello-World/downloads", + "issues_url": "https://api.github.com/repos/Octocoders/Hello-World/issues{/number}", + "pulls_url": "https://api.github.com/repos/Octocoders/Hello-World/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Octocoders/Hello-World/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Octocoders/Hello-World/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Octocoders/Hello-World/labels{/name}", + "releases_url": "https://api.github.com/repos/Octocoders/Hello-World/releases{/id}", + "deployments_url": "https://api.github.com/repos/Octocoders/Hello-World/deployments", + "created_at": "2019-05-15T15:20:42Z", + "updated_at": "2019-05-15T15:20:41Z", + "pushed_at": "2019-05-15T15:20:33Z", + "git_url": "git://github.com/Octocoders/Hello-World.git", + "ssh_url": "git@github.com:Octocoders/Hello-World.git", + "clone_url": "https://github.com/Octocoders/Hello-World.git", + "svn_url": "https://github.com/Octocoders/Hello-World", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": false, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master" + }, + "sender": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "organization": { + "login": "Octocoders", + "id": 38302899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5", + "url": "https://api.github.com/orgs/Octocoders", + "repos_url": "https://api.github.com/orgs/Octocoders/repos", + "events_url": "https://api.github.com/orgs/Octocoders/events", + "hooks_url": "https://api.github.com/orgs/Octocoders/hooks", + "issues_url": "https://api.github.com/orgs/Octocoders/issues", + "members_url": "https://api.github.com/orgs/Octocoders/members{/member}", + "public_members_url": "https://api.github.com/orgs/Octocoders/public_members{/member}", + "avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4", + "description": "" + }, + "installation": { + "id": 1, + "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMQ==" + } +} diff --git a/payload-schemas/api.github.com/common/app.schema.json b/payload-schemas/api.github.com/common/app.schema.json index ce047cc98..a155ed9e7 100644 --- a/payload-schemas/api.github.com/common/app.schema.json +++ b/payload-schemas/api.github.com/common/app.schema.json @@ -35,14 +35,17 @@ "description": "The set of permissions for the GitHub app", "type": "object", "properties": { - "administration": { "type": "string", "enum": ["read", "write"] }, "actions": { "type": "string", "enum": ["read", "write"] }, + "administration": { "type": "string", "enum": ["read", "write"] }, "checks": { "type": "string", "enum": ["read", "write"] }, + "content_references": { "type": "string", "enum": ["read", "write"] }, "contents": { "type": "string", "enum": ["read", "write"] }, "deployments": { "type": "string", "enum": ["read", "write"] }, + "discussions": { "type": "string", "enum": ["read", "write"] }, + "emails": { "type": "string", "enum": ["read", "write"] }, + "environments": { "type": "string", "enum": ["read", "write"] }, "issues": { "type": "string", "enum": ["read", "write"] }, "members": { "type": "string", "enum": ["read", "write"] }, - "emails": { "type": "string", "enum": ["read", "write"] }, "metadata": { "type": "string", "enum": ["read", "write"] }, "organization_administration": { "type": "string", @@ -58,16 +61,31 @@ "type": "string", "enum": ["read", "write"] }, + "organization_secrets": { "type": "string", "enum": ["read", "write"] }, + "organization_self_hosted_runners": { + "type": "string", + "enum": ["read", "write"] + }, "organization_user_blocking": { "type": "string", "enum": ["read", "write"] }, - "pages": { "type": "string", "enum": ["read", "write"] }, "packages": { "type": "string", "enum": ["read", "write"] }, + "pages": { "type": "string", "enum": ["read", "write"] }, "pull_requests": { "type": "string", "enum": ["read", "write"] }, "repository_hooks": { "type": "string", "enum": ["read", "write"] }, "repository_projects": { "type": "string", "enum": ["read", "write"] }, + "secret_scanning_alerts": { + "type": "string", + "enum": ["read", "write"] + }, + "secrets": { "type": "string", "enum": ["read", "write"] }, "security_events": { "type": "string", "enum": ["read", "write"] }, + "security_scanning_alert": { + "type": "string", + "enum": ["read", "write"] + }, + "single_file": { "type": "string", "enum": ["read", "write"] }, "statuses": { "type": "string", "enum": ["read", "write"] }, "team_discussions": { "type": "string", "enum": ["read", "write"] }, "vulnerability_alerts": { "type": "string", "enum": ["read", "write"] }, diff --git a/payload-schemas/api.github.com/common/installation.schema.json b/payload-schemas/api.github.com/common/installation.schema.json index 7758115e2..cf9ad726a 100644 --- a/payload-schemas/api.github.com/common/installation.schema.json +++ b/payload-schemas/api.github.com/common/installation.schema.json @@ -16,7 +16,9 @@ "events", "created_at", "updated_at", - "single_file_name" + "single_file_name", + "suspended_at", + "suspended_by" ], "type": "object", "properties": { @@ -44,10 +46,11 @@ "actions": { "type": "string", "enum": ["read", "write"] }, "administration": { "type": "string", "enum": ["read", "write"] }, "checks": { "type": "string", "enum": ["read", "write"] }, - "contents": { "type": "string", "enum": ["read", "write"] }, "content_references": { "type": "string", "enum": ["read", "write"] }, + "contents": { "type": "string", "enum": ["read", "write"] }, "deployments": { "type": "string", "enum": ["read", "write"] }, "discussions": { "type": "string", "enum": ["read", "write"] }, + "emails": { "type": "string", "enum": ["read", "write"] }, "environments": { "type": "string", "enum": ["read", "write"] }, "issues": { "type": "string", "enum": ["read", "write"] }, "members": { "type": "string", "enum": ["read", "write"] }, @@ -75,22 +78,26 @@ "type": "string", "enum": ["read", "write"] }, - "pages": { "type": "string", "enum": ["read", "write"] }, "packages": { "type": "string", "enum": ["read", "write"] }, + "pages": { "type": "string", "enum": ["read", "write"] }, "pull_requests": { "type": "string", "enum": ["read", "write"] }, "repository_hooks": { "type": "string", "enum": ["read", "write"] }, "repository_projects": { "type": "string", "enum": ["read", "write"] }, - "secrets": { "type": "string", "enum": ["read", "write"] }, "secret_scanning_alerts": { "type": "string", "enum": ["read", "write"] }, + "secrets": { "type": "string", "enum": ["read", "write"] }, "security_events": { "type": "string", "enum": ["read", "write"] }, + "security_scanning_alert": { + "type": "string", + "enum": ["read", "write"] + }, "single_file": { "type": "string", "enum": ["read", "write"] }, "statuses": { "type": "string", "enum": ["read", "write"] }, "team_discussions": { "type": "string", "enum": ["read", "write"] }, - "workflows": { "type": "string", "enum": ["read", "write"] }, - "vulnerability_alerts": { "type": "string", "enum": ["read", "write"] } + "vulnerability_alerts": { "type": "string", "enum": ["read", "write"] }, + "workflows": { "type": "string", "enum": ["read", "write"] } }, "additionalProperties": false }, diff --git a/payload-schemas/api.github.com/common/release-asset.schema.json b/payload-schemas/api.github.com/common/release-asset.schema.json index ec4b7c164..d9ead347a 100644 --- a/payload-schemas/api.github.com/common/release-asset.schema.json +++ b/payload-schemas/api.github.com/common/release-asset.schema.json @@ -23,7 +23,7 @@ "id": { "type": "integer" }, "node_id": { "type": "string" }, "name": { "description": "The file name of the asset.", "type": "string" }, - "label": { "type": "string" }, + "label": { "type": ["string", "null"] }, "state": { "description": "State of the release asset.", "type": "string", diff --git a/payload-schemas/api.github.com/repository/renamed.schema.json b/payload-schemas/api.github.com/repository/renamed.schema.json index 1889c8f68..9e9a382d2 100644 --- a/payload-schemas/api.github.com/repository/renamed.schema.json +++ b/payload-schemas/api.github.com/repository/renamed.schema.json @@ -2,9 +2,31 @@ "$schema": "http://json-schema.org/draft-07/schema", "$id": "repository$renamed", "type": "object", - "required": ["action", "repository", "sender"], + "required": ["action", "changes", "repository", "sender"], "properties": { "action": { "type": "string", "enum": ["renamed"] }, + "changes": { + "type": "object", + "required": ["repository"], + "properties": { + "repository": { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "type": "object", + "required": ["from"], + "properties": { + "from": { "type": "string" } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, "repository": { "$ref": "common/repository.schema.json" }, "sender": { "$ref": "common/user.schema.json" }, "installation": { "$ref": "common/installation-lite.schema.json" }, diff --git a/payload-types/schema.d.ts b/payload-types/schema.d.ts index f589aa431..117665d2f 100644 --- a/payload-types/schema.d.ts +++ b/payload-types/schema.d.ts @@ -536,27 +536,36 @@ export interface App { * The set of permissions for the GitHub app */ permissions?: { - administration?: "read" | "write"; actions?: "read" | "write"; + administration?: "read" | "write"; checks?: "read" | "write"; + content_references?: "read" | "write"; contents?: "read" | "write"; deployments?: "read" | "write"; + discussions?: "read" | "write"; + emails?: "read" | "write"; + environments?: "read" | "write"; issues?: "read" | "write"; members?: "read" | "write"; - emails?: "read" | "write"; metadata?: "read" | "write"; organization_administration?: "read" | "write"; organization_hooks?: "read" | "write"; organization_packages?: "read" | "write"; organization_plan?: "read" | "write"; organization_projects?: "read" | "write"; + organization_secrets?: "read" | "write"; + organization_self_hosted_runners?: "read" | "write"; organization_user_blocking?: "read" | "write"; - pages?: "read" | "write"; packages?: "read" | "write"; + pages?: "read" | "write"; pull_requests?: "read" | "write"; repository_hooks?: "read" | "write"; repository_projects?: "read" | "write"; + secret_scanning_alerts?: "read" | "write"; + secrets?: "read" | "write"; security_events?: "read" | "write"; + security_scanning_alert?: "read" | "write"; + single_file?: "read" | "write"; statuses?: "read" | "write"; team_discussions?: "read" | "write"; vulnerability_alerts?: "read" | "write"; @@ -2429,10 +2438,11 @@ export interface Installation { actions?: "read" | "write"; administration?: "read" | "write"; checks?: "read" | "write"; - contents?: "read" | "write"; content_references?: "read" | "write"; + contents?: "read" | "write"; deployments?: "read" | "write"; discussions?: "read" | "write"; + emails?: "read" | "write"; environments?: "read" | "write"; issues?: "read" | "write"; members?: "read" | "write"; @@ -2445,19 +2455,20 @@ export interface Installation { organization_secrets?: "read" | "write"; organization_self_hosted_runners?: "read" | "write"; organization_user_blocking?: "read" | "write"; - pages?: "read" | "write"; packages?: "read" | "write"; + pages?: "read" | "write"; pull_requests?: "read" | "write"; repository_hooks?: "read" | "write"; repository_projects?: "read" | "write"; - secrets?: "read" | "write"; secret_scanning_alerts?: "read" | "write"; + secrets?: "read" | "write"; security_events?: "read" | "write"; + security_scanning_alert?: "read" | "write"; single_file?: "read" | "write"; statuses?: "read" | "write"; team_discussions?: "read" | "write"; - workflows?: "read" | "write"; vulnerability_alerts?: "read" | "write"; + workflows?: "read" | "write"; }; events: ( | "check_run" @@ -2510,8 +2521,8 @@ export interface Installation { single_file_name: string | null; has_multiple_single_files?: boolean; single_file_paths?: string[]; - suspended_by?: User | null; - suspended_at?: string | null; + suspended_by: User | null; + suspended_at: string | null; } export interface InstallationDeletedEvent { action: "deleted"; @@ -4936,7 +4947,7 @@ export interface ReleaseAsset { * The file name of the asset. */ name: string; - label: string; + label: string | null; /** * State of the release asset. */ @@ -5089,6 +5100,13 @@ export interface RepositoryPublicizedEvent { } export interface RepositoryRenamedEvent { action: "renamed"; + changes: { + repository: { + name: { + from: string; + }; + }; + }; repository: Repository; sender: User; installation?: InstallationLite;