From 7023f50b84110d1512a5e86e3c9feeda6d915786 Mon Sep 17 00:00:00 2001 From: Octokit Bot <33075676+octokitbot@users.noreply.github.com> Date: Thu, 21 Jan 2021 12:01:21 -0800 Subject: [PATCH] feat: `author_association` schema (#26) --- cache/openapi-schema.json | 115 +++++++++++++++++++++++--------------- generated/types.ts | 49 ++++++++-------- package.json | 2 +- 3 files changed, 95 insertions(+), 71 deletions(-) diff --git a/cache/openapi-schema.json b/cache/openapi-schema.json index 9e2f17023..666296337 100644 --- a/cache/openapi-schema.json +++ b/cache/openapi-schema.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "2.4.0", + "version": "2.4.1", "title": "GitHub's official OpenAPI spec + Octokit extension", "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs", "license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" }, @@ -38862,6 +38862,22 @@ "updated_at" ] }, + "author_association": { + "title": "author_association", + "type": "string", + "example": "OWNER", + "description": "How the author is associated with the repository.", + "enum": [ + "COLLABORATOR", + "CONTRIBUTOR", + "FIRST_TIMER", + "FIRST_TIME_CONTRIBUTOR", + "MANNEQUIN", + "MEMBER", + "NONE", + "OWNER" + ] + }, "issue-simple": { "title": "Issue Simple", "description": "Issue Simple", @@ -38975,7 +38991,9 @@ "format": "date-time", "example": "2011-04-22T13:33:48Z" }, - "author_association": { "type": "string" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "body_html": { "type": "string" }, "body_text": { "type": "string" }, "timeline_url": { "type": "string", "format": "uri" }, @@ -39078,17 +39096,7 @@ }, "issue_url": { "type": "string", "format": "uri" }, "author_association": { - "type": "string", - "enum": [ - "collaborator", - "contributor", - "first_timer", - "first_time_contributor", - "mannequin", - "member", - "none", - "owner" - ] + "$ref": "#/components/schemas/author_association" }, "performed_via_github_app": { "nullable": true, @@ -39382,7 +39390,9 @@ "format": "date-time", "example": "2011-04-18T23:23:56Z" }, - "author_association": { "type": "string" } + "author_association": { + "$ref": "#/components/schemas/author_association" + } }, "required": [ "url", @@ -39568,7 +39578,9 @@ "nullable": true, "allOf": [{ "$ref": "#/components/schemas/integration" }] }, - "author_association": { "type": "string" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "reactions": { "$ref": "#/components/schemas/reaction-rollup" } }, "required": [ @@ -44248,7 +44260,9 @@ }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, - "author_association": { "type": "string" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "reactions": { "$ref": "#/components/schemas/reaction-rollup" } }, "required": [ @@ -44498,7 +44512,9 @@ "self" ] }, - "author_association": { "type": "string", "example": "OWNER" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "draft": { "description": "Indicates whether or not the pull request is a draft.", "example": false, @@ -46035,7 +46051,9 @@ "$ref": "#/components/schemas/issue-event-project-card" }, "rename": { "$ref": "#/components/schemas/issue-event-rename" }, - "author_association": { "type": "string" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "lock_reason": { "type": "string", "nullable": true } }, "required": [ @@ -46083,8 +46101,7 @@ "example": "\"2020-07-09T00:17:36Z\"" }, "author_association": { - "type": "string", - "example": "\"COLLABORATOR\"" + "$ref": "#/components/schemas/author_association" }, "body": { "type": "string", "example": "\":+1:\"" }, "lock_reason": { "type": "string", "example": "\"off-topic\"" }, @@ -47040,7 +47057,9 @@ "self" ] }, - "author_association": { "type": "string", "example": "OWNER" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "draft": { "description": "Indicates whether or not the pull request is a draft.", "example": false, @@ -47204,9 +47223,7 @@ "example": "https://api.github.com/repos/octocat/Hello-World/pulls/1" }, "author_association": { - "description": "How the author of the comment is associated with the pull request.", - "type": "string", - "example": "OWNER" + "$ref": "#/components/schemas/author_association" }, "_links": { "type": "object", @@ -47395,7 +47412,9 @@ }, "body_html": { "type": "string" }, "body_text": { "type": "string" }, - "author_association": { "type": "string" } + "author_association": { + "$ref": "#/components/schemas/author_association" + } }, "required": [ "id", @@ -47471,7 +47490,9 @@ "format": "uri", "example": "https://api.github.com/repos/octocat/Hello-World/pulls/1" }, - "author_association": { "type": "string" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "_links": { "type": "object", "properties": { @@ -48513,7 +48534,9 @@ }, "body": { "type": "string" }, "score": { "type": "integer" }, - "author_association": { "type": "string" }, + "author_association": { + "$ref": "#/components/schemas/author_association" + }, "draft": { "type": "boolean" }, "repository": { "$ref": "#/components/schemas/repository" }, "body_html": { "type": "string" }, @@ -50406,7 +50429,7 @@ }, "created_at": "2011-04-18T23:23:56Z", "updated_at": "2011-04-18T23:23:56Z", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } ] }, @@ -50438,7 +50461,7 @@ }, "created_at": "2011-04-18T23:23:56Z", "updated_at": "2011-04-18T23:23:56Z", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "gist-commit-items": { @@ -50945,7 +50968,7 @@ "open_issues": 1, "watchers": 1 }, - "author_association": "collaborator" + "author_association": "COLLABORATOR" } ] }, @@ -57512,7 +57535,7 @@ }, "created_at": "2011-04-14T16:00:49Z", "updated_at": "2011-04-14T16:00:49Z", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } ] }, @@ -57527,7 +57550,7 @@ "position": 4, "line": 14, "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "author_association": "collaborator", + "author_association": "COLLABORATOR", "user": { "login": "octocat", "id": 1, @@ -57563,7 +57586,7 @@ "position": 4, "line": 14, "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "author_association": "collaborator", + "author_association": "COLLABORATOR", "user": { "login": "octocat", "id": 1, @@ -60319,7 +60342,7 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } ] }, @@ -60479,7 +60502,7 @@ "type": "User", "site_admin": false }, - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "issue-comment-items": { @@ -60513,7 +60536,7 @@ "created_at": "2011-04-14T16:00:49Z", "updated_at": "2011-04-14T16:00:49Z", "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } ] }, @@ -60547,7 +60570,7 @@ "created_at": "2011-04-14T16:00:49Z", "updated_at": "2011-04-14T16:00:49Z", "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "issue-event-items": { @@ -60715,7 +60738,7 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } } ] @@ -60884,7 +60907,7 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } } }, @@ -61064,7 +61087,7 @@ "closed_at": null, "created_at": "2011-04-22T13:33:48Z", "updated_at": "2011-04-22T13:33:48Z", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "issue-event-for-issue-items": { @@ -62798,7 +62821,7 @@ }, "submitted_at": "2019-11-17T17:43:43Z", "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } ] }, @@ -62840,7 +62863,7 @@ }, "submitted_at": "2019-11-17T17:43:43Z", "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "pull-request-review-4": { @@ -62881,7 +62904,7 @@ }, "submitted_at": "2019-11-17T17:43:43Z", "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "pull-request-review-5": { @@ -62922,7 +62945,7 @@ }, "submitted_at": "2019-11-17T17:43:43Z", "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "review-comment-items": { @@ -63017,7 +63040,7 @@ }, "submitted_at": "2019-11-17T17:43:43Z", "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", - "author_association": "collaborator" + "author_association": "COLLABORATOR" } }, "content-file": { @@ -64655,7 +64678,7 @@ "body": "...", "score": 1, "locked": true, - "author_association": "collaborator" + "author_association": "COLLABORATOR" } ] } diff --git a/generated/types.ts b/generated/types.ts index d236494fe..d52003a18 100644 --- a/generated/types.ts +++ b/generated/types.ts @@ -23572,6 +23572,18 @@ export interface components { closed_at: string | null; due_on: string | null; }; + /** + * How the author is associated with the repository. + */ + author_association: + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; /** * Issue Simple */ @@ -23606,7 +23618,7 @@ export interface components { closed_at: string | null; created_at: string; updated_at: string; - author_association: string; + author_association: components["schemas"]["author_association"]; body_html?: string; body_text?: string; timeline_url?: string; @@ -23649,15 +23661,7 @@ export interface components { created_at: string; updated_at: string; issue_url: string; - author_association: - | "collaborator" - | "contributor" - | "first_timer" - | "first_time_contributor" - | "mannequin" - | "member" - | "none" - | "owner"; + author_association: components["schemas"]["author_association"]; performed_via_github_app?: components["schemas"]["integration"] | null; reactions?: components["schemas"]["reaction-rollup"]; }; @@ -23793,7 +23797,7 @@ export interface components { user: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; - author_association: string; + author_association: components["schemas"]["author_association"]; }; /** * Gist Commit @@ -23878,7 +23882,7 @@ export interface components { timeline_url?: string; repository?: components["schemas"]["repository"]; performed_via_github_app?: components["schemas"]["integration"] | null; - author_association: string; + author_association: components["schemas"]["author_association"]; reactions?: components["schemas"]["reaction-rollup"]; }; /** @@ -25741,7 +25745,7 @@ export interface components { user: components["schemas"]["simple-user"] | null; created_at: string; updated_at: string; - author_association: string; + author_association: components["schemas"]["author_association"]; reactions?: components["schemas"]["reaction-rollup"]; }; /** @@ -25833,7 +25837,7 @@ export interface components { review_comment: components["schemas"]["link"]; self: components["schemas"]["link"]; }; - author_association: string; + author_association: components["schemas"]["author_association"]; /** * Indicates whether or not the pull request is a draft. */ @@ -26498,7 +26502,7 @@ export interface components { milestone?: components["schemas"]["issue-event-milestone"]; project_card?: components["schemas"]["issue-event-project-card"]; rename?: components["schemas"]["issue-event-rename"]; - author_association?: string; + author_association?: components["schemas"]["author_association"]; lock_reason?: string | null; }; /** @@ -26518,7 +26522,7 @@ export interface components { message?: string; issue_url?: string; updated_at?: string; - author_association?: string; + author_association?: components["schemas"]["author_association"]; body?: string; lock_reason?: string; submitted_at?: string; @@ -26928,7 +26932,7 @@ export interface components { review_comment: components["schemas"]["link"]; self: components["schemas"]["link"]; }; - author_association: string; + author_association: components["schemas"]["author_association"]; /** * Indicates whether or not the pull request is a draft. */ @@ -27012,10 +27016,7 @@ export interface components { * URL for the pull request that the review comment belongs to. */ pull_request_url: string; - /** - * How the author of the comment is associated with the pull request. - */ - author_association: string; + author_association: components["schemas"]["author_association"]; _links: { self: { href: string }; html: { href: string }; @@ -27089,7 +27090,7 @@ export interface components { commit_id: string; body_html?: string; body_text?: string; - author_association: string; + author_association: components["schemas"]["author_association"]; }; /** * Legacy Review Comment @@ -27112,7 +27113,7 @@ export interface components { updated_at: string; html_url: string; pull_request_url: string; - author_association: string; + author_association: components["schemas"]["author_association"]; _links: { self: components["schemas"]["link"]; html: components["schemas"]["link"]; @@ -27557,7 +27558,7 @@ export interface components { }; body?: string; score: number; - author_association: string; + author_association: components["schemas"]["author_association"]; draft?: boolean; repository?: components["schemas"]["repository"]; body_html?: string; diff --git a/package.json b/package.json index 9081375a1..82911b614 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,6 @@ "branches": "main" }, "octokit": { - "openapi-version": "2.4.0" + "openapi-version": "2.4.1" } }