Skip to content

Commit

Permalink
🐛 fix create release default value
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Apr 22, 2023
1 parent ae17135 commit 91df6af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions githubkit/rest/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17598,7 +17598,7 @@ class ReposOwnerRepoReleasesPostBody(GitHubRestModel):
)
make_latest: Missing[Literal["true", "false", "legacy"]] = Field(
description="Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version.",
default=True,
default="true",
)


Expand Down Expand Up @@ -17656,7 +17656,7 @@ class ReposOwnerRepoReleasesReleaseIdPatchBody(GitHubRestModel):
)
make_latest: Missing[Literal["true", "false", "legacy"]] = Field(
description="Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version.",
default=True,
default="true",
)
discussion_category_name: Missing[str] = Field(
description='If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)."',
Expand Down
8 changes: 4 additions & 4 deletions githubkit/rest/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -10749,7 +10749,7 @@ def create_release(
prerelease: Missing[bool] = False,
discussion_category_name: Missing[str] = UNSET,
generate_release_notes: Missing[bool] = False,
make_latest: Missing[Literal["true", "false", "legacy"]] = True,
make_latest: Missing[Literal["true", "false", "legacy"]] = "true",
) -> "Response[Release]":
...

Expand Down Expand Up @@ -10812,7 +10812,7 @@ async def async_create_release(
prerelease: Missing[bool] = False,
discussion_category_name: Missing[str] = UNSET,
generate_release_notes: Missing[bool] = False,
make_latest: Missing[Literal["true", "false", "legacy"]] = True,
make_latest: Missing[Literal["true", "false", "legacy"]] = "true",
) -> "Response[Release]":
...

Expand Down Expand Up @@ -11341,7 +11341,7 @@ def update_release(
body: Missing[str] = UNSET,
draft: Missing[bool] = UNSET,
prerelease: Missing[bool] = UNSET,
make_latest: Missing[Literal["true", "false", "legacy"]] = True,
make_latest: Missing[Literal["true", "false", "legacy"]] = "true",
discussion_category_name: Missing[str] = UNSET,
) -> "Response[Release]":
...
Expand Down Expand Up @@ -11405,7 +11405,7 @@ async def async_update_release(
body: Missing[str] = UNSET,
draft: Missing[bool] = UNSET,
prerelease: Missing[bool] = UNSET,
make_latest: Missing[Literal["true", "false", "legacy"]] = True,
make_latest: Missing[Literal["true", "false", "legacy"]] = "true",
discussion_category_name: Missing[str] = UNSET,
) -> "Response[Release]":
...
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,12 @@ output_dir = "githubkit/rest/"
"/components/schemas/repo-search-result-item/properties/temp_clone_token" = { type = ["string", "null"] }

# https://github.com/github/rest-api-description/issues/2491
"/components/schemas/auto-merge/properties/commit_title" = { type = ["string", "null"] }
"/components/schemas/auto-merge/properties/commit_message" = { type = ["string", "null"] }
"/components/schemas/auto-merge/properties/commit_title" = { type = ["string", "null"] }
"/components/schemas/auto-merge/properties/commit_message" = { type = ["string", "null"] }

# https://github.com/github/rest-api-description/issues/2496
"/paths/~1repos~1{owner}~1{repo}~1releases/post/requestBody/content/application~1json/schema/properties/make_latest" = { default = "true" }
"/paths/~1repos~1{owner}~1{repo}~1releases~1{release_id}/patch/requestBody/content/application~1json/schema/properties/make_latest" = { default = "true" }

[tool.codegen.webhook]
schema_source = "https://unpkg.com/@octokit/webhooks-schemas/schema.json"
Expand Down

0 comments on commit 91df6af

Please sign in to comment.