Hi community,
I’m using the GraphQL API for https://github.com/AndreMiras/gitpop3 and realised the pushedAt
field may not do what I was initially expecting.
I thought pushedAt
returned the date of the last commit or at least the last project activity.
However when I query the pushedAt
field for all the django/django forks, something surprising is returned.
Here’s the query:
{
repository(owner: "django", name: "django") {
forks(first: 3, orderBy: {field: STARGAZERS, direction: DESC}) {
nodes {
nameWithOwner
stargazerCount
pushedAt
object(expression: "master") {
... on Commit {
committedDate
}
}
}
}
}
}
Here’s the response:
{
"data": {
"repository": {
"forks": {
"nodes": [
{
"nameWithOwner": "django-nonrel/django",
"stargazerCount": 215,
"forkCount": 84,
"pushedAt": "2020-08-29T14:23:26Z",
"object": {
"committedDate": "2013-02-24T17:35:08Z",
"history": {
"totalCount": 13990
}
}
},
{
"nameWithOwner": "andrewgodwin/django",
"stargazerCount": 26,
"forkCount": 2,
"pushedAt": "2020-04-12T16:14:37Z",
"object": {
"committedDate": "2019-04-12T13:15:18Z",
"history": {
"totalCount": 26823
}
}
},
{
"nameWithOwner": "FlipperPA/django-mssql-backend",
"stargazerCount": 18,
"forkCount": 2,
"pushedAt": "2020-03-14T22:44:44Z",
"object": {
"committedDate": "2020-03-13T11:06:28Z",
"history": {
"totalCount": 28017
}
}
}
]
}
}
}
}
As we can see the top fork (by stargazerCount
) is django-nonrel/django
and has a "pushedAt": "2020-08-29T14:23:26Z"
. I’ve checked on the repo cross branches and most recent commit was 6 years ago which doesn’t match with what pushedAt
returned. Then I’ve also checked all project activities, by looking most recent issues and PR, but I couldn’t find a date that matched with the pushedAt
field.
So my question is what is pushedAt
supposed to do? Or could it be that this is the date for a branch that was later deleted without being merged?
Note that for last commit, the committedDate
field seems to work OK so far.