Rewrite repo.organization._url to a proper repo._makeStringAttribute

This commit is contained in:
Mikhail f. Shiryaev 2023-11-15 10:35:39 +01:00
parent 4b7c80d824
commit eb4add06ba
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -230,8 +230,8 @@ def main():
# An ugly and not nice fix to patch the wrong organization URL,
# see https://github.com/PyGithub/PyGithub/issues/2395#issuecomment-1378629710
# pylint: disable=protected-access
repo.organization._url.value = repo.organization.url.replace( # type: ignore
"/users/", "/orgs/", 1
repo.organization._url = repo._makeStringAttribute(
repo.organization.url.replace("/users/", "/orgs/", 1)
)
# pylint: enable=protected-access
pr = repo.get_pull(args.pr)