Skip to content
This repository has been archived by the owner on Mar 11, 2023. It is now read-only.

Idea for a strategy to find the repo from the remote list #39

Open
Seluj78 opened this issue Dec 13, 2019 · 5 comments
Open

Idea for a strategy to find the repo from the remote list #39

Seluj78 opened this issue Dec 13, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@Seluj78
Copy link
Collaborator

Seluj78 commented Dec 13, 2019

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 #37 (comment)

@Seluj78 Seluj78 added the enhancement New feature or request label Dec 13, 2019
@awecx
Copy link
Collaborator

awecx commented Dec 13, 2019

@JulienPalard I'll propose a PR in this idea.

@Seluj78 Seluj78 added this to the Version 1.0 🎉 milestone Aug 25, 2020
@Seluj78
Copy link
Collaborator Author

Seluj78 commented Oct 15, 2020

@awecx still waiting 😉

@awecx
Copy link
Collaborator

awecx commented Oct 15, 2020

still WIP 😅

@Seluj78
Copy link
Collaborator Author

Seluj78 commented Dec 27, 2020

@awecx ping

@Seluj78
Copy link
Collaborator Author

Seluj78 commented Dec 27, 2020

If you don't have time to work on it, hit me up and I'll do it 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants