MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / as_url_param

Method as_url_param

github/Repository.py:1278–1286  ·  view source on GitHub ↗
(repo: str | Repository)

Source from the content-addressed store, hash-verified

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 """

Callers 7

add_to_reposMethod · 0.80
get_repo_permissionMethod · 0.80
set_repo_permissionMethod · 0.80
has_in_reposMethod · 0.80
remove_from_reposMethod · 0.80
testAsUrlParamMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected