Time of creation of a Github Fork
git, github, version-control
Solution
You could use the GitHub Repos API, it does contain the creation date:
GET /users/:user/repos
...
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z", <====
"updated_at": "2011-01-26T19:14:43Z"
}
More precisely, using `jq` for JSON filtering, to get creation date of my old GitHub repository `VonC/b2d`:
VonC@vonc MINGW64 /c/Users/vonc/git
$ curl https://api.github.com/users/VonC/repos | jq '.[] | select(.name=="b2d") | .created_at'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 153k 100 153k 0 0 105k 0 0:00:01 0:00:01 --:--:-- 105k
"2015-03-28T19:58:35Z"
Or, using the GitHub CLI `gh repo view` (no need for `curl -s https://api.github.com`)
gh repo view vonc/b2d --json createdAt --jq ".createdAt"
2015-03-28T19:58:35Z
If you still want to use the GitHub Repos API:
gh api repos/vonc/b2d --jq ".created_at"
2015-03-28T19:58:35Z
Problem
For doing some research on my Github fork , I need to know the exact time it was created. Anyway to do so? Maybe some metadata somewhere?