Skip to content

Commit

Permalink
update edit method too
Browse files Browse the repository at this point in the history
  • Loading branch information
tekumara committed Oct 18, 2023
1 parent 8380095 commit f4c9a83
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions github/Organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,11 @@ def edit(
email: Opt[str] = NotSet,
location: Opt[str] = NotSet,
name: Opt[str] = NotSet,
use_squash_pr_title_as_default: Opt[bool] = NotSet,
squash_merge_commit_title: Opt[str] = NotSet,
squash_merge_commit_message: Opt[str] = NotSet,
merge_commit_title: Opt[str] = NotSet,
merge_commit_message: Opt[str] = NotSet,
) -> None:
"""
:calls: `PATCH /orgs/{org} <https://docs.github.com/en/rest/reference/orgs>`_
Expand All @@ -731,6 +736,25 @@ def edit(
assert is_optional(email, str), email
assert is_optional(location, str), location
assert is_optional(name, str), name
assert is_optional(use_squash_pr_title_as_default, bool), use_squash_pr_title_as_default
assert is_undefined(squash_merge_commit_title) or squash_merge_commit_title in [
"PR_TITLE",
"COMMIT_OR_PR_TITLE",
], squash_merge_commit_title
assert is_undefined(squash_merge_commit_message) or squash_merge_commit_message in [
"PR_BODY",
"COMMIT_MESSAGES",
"BLANK",
], squash_merge_commit_message
assert is_undefined(merge_commit_title) or merge_commit_title in [
"PR_TITLE",
"MERGE_MESSAGE",
], merge_commit_title
assert is_undefined(merge_commit_message) or merge_commit_message in [
"PR_TITLE",
"PR_BODY",
"BLANK",
], merge_commit_message
post_parameters = NotSet.remove_unset_items(
{
"billing_email": billing_email,
Expand All @@ -740,6 +764,11 @@ def edit(
"email": email,
"location": location,
"name": name,
"use_squash_pr_title_as_default": use_squash_pr_title_as_default,
"squash_merge_commit_title": squash_merge_commit_title,
"squash_merge_commit_message": squash_merge_commit_message,
"merge_commit_title": merge_commit_title,
"merge_commit_message": merge_commit_message,
}
)

Expand Down

0 comments on commit f4c9a83

Please sign in to comment.