(repo: str | Repository)
| 1276 | |
| 1277 | @staticmethod |
| 1278 | def as_url_param(repo: str | Repository) -> str: |
| 1279 | assert isinstance(repo, (str, github.Repository.Repository)) |
| 1280 | if isinstance(repo, github.Repository.Repository): |
| 1281 | return repo._identity # type: ignore |
| 1282 | else: |
| 1283 | # we expect exactly one slash in the repo name |
| 1284 | assert len(repo.split("/")) == 2, repo |
| 1285 | # do not quote the slash as this is expected to become part of URL path |
| 1286 | return urllib.parse.quote(repo, safe="/") |
| 1287 | |
| 1288 | def add_to_collaborators(self, collaborator: str | NamedUser, permission: Opt[str] = NotSet) -> Invitation | None: |
| 1289 | """ |
no outgoing calls
no test coverage detected