-
Notifications
You must be signed in to change notification settings - Fork 4
Description
For some collabs, get_repo_by_url appears to fail.
I have tested this for Collabs where I wasn't a member initially, and then later added as an admin. Failed in both cases.
Cause of failure:
get_repos_by_filter("owner", "collab-" + collab_name + "-administrator"
get_repos_by_filter("owner", "collab-" + collab_name + "-editor")
get_repos_by_filter("owner", "collab-" + collab_name + "-viewer")
all of these fail beause the "owner" field for these Collabs are simply "Organization".
I cannot find any other info in the Repo object whereby I can map it to the URL info.
Examples of Collabs where this was observed:
https://wiki.ebrains.eu/bin/view/Collabs/test-public-collab-ms/
https://wiki.ebrains.eu/bin/view/Collabs/nmc-collab-copy-template
Not sure how get_repo_by_url can be fixed, unless some new info is added to the returned object.
Current workaround:
Use the get_repos_by_name or get_repos_by_filter methods. E.g.
get_repos_by_name("Test public collab-ms")[0]
Note: the above can return multiple repos that match the same name (or other filters); hence return type is a list of Repo