GitHub api -
For the getRepos action, you will get a list of the user's repositories.
The repository objects that are returned have some information in them. However, they don't seem to have any information about "what repository am i forked from?"
How can I get that?
Clicking the number of forks shows you the full network. From there you can click "members" to see who forked the repo.
In the "Get" section of the repo API, you can see two fields which address your question:
The
parent
andsource
objects are present when the repo is a fork:
parent
is the repo this repo was forked from,source
is the ultimate source for the network.
When I get my fork of the git repo, I see:
curl -s "https://api.github.com/repos/VonC/git"
"parent": {
"id": 36502,
"name": "git",
"full_name": "git/git",
"owner": {
"login": "git",
"id": 18133,
You can get the forked repo information by reading the content of the parent field.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With