Idea for a strategy to find the repo from the remote list: - List all remotes - Filter by keeping only the ones targeting github.com - Hit the first one on the github API (https://api.github.com/repos/{the_repo}) - See if it has a "parent" attribute: - it it has one, the good one is the parent, and we have the github URL. no longer need to care about knowing its local name. - if it has none, lucky you it's the right one Demo of finding it indirectly: ``` $ curl https://api.github.com/repos/seluj78/python-docs-fr | jq .parent.url "https://api.github.com/repos/python/python-docs-fr" ``` Or demo of lucky "it was the right one so it has no parent": ``` $ curl https://api.github.com/repos/python/python-docs-fr | jq .parent.url null ``` _Originally posted by @JulienPalard in https://github.com/Seluj78/Potodo/issues/37#issuecomment-565355937_
Idea for a strategy to find the repo from the remote list:
Demo of finding it indirectly:
Or demo of lucky "it was the right one so it has no parent":
Originally posted by @JulienPalard in #37 (comment)