Skip to content

Commit

Permalink
don't know if this helps...
Browse files Browse the repository at this point in the history
  • Loading branch information
treee111 committed Jan 26, 2024
1 parent 8e9f422 commit 8776ae5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions github/Branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,19 +350,19 @@ def edit_required_status_checks(
if is_defined(checks):
assert all(not isinstance(check, tuple) or list(map(type, check)) == [str, int] for check in checks), checks

post_parameters: dict[str, Any] = NotSet.remove_unset_items({"strict": strict})

if is_defined(checks):
post_parameters["checks"] = []
checks_parameters = []
for check in checks:
if isinstance(check, tuple):
context, app_id = check
post_parameters["checks"].append({"context": context, "app_id": app_id})
checks_parameters.append({"context": context, "app_id": app_id})
else:
post_parameters["checks"].append({"context": check})
checks_parameters.append({"context": check})

elif is_defined(contexts):
post_parameters["checks"] = [{"context": context} for context in contexts]
checks_parameters = [{"context": context} for context in contexts]

post_parameters: dict[str, Any] = NotSet.remove_unset_items({"strict": strict, "checks": checks_parameters})

headers, data = self._requester.requestJsonAndCheck(
"PATCH",
Expand Down

0 comments on commit 8776ae5

Please sign in to comment.