Commit context creator login and avatar different from web

schema-request

#1

I’m querying the commit status context for a ref and want to create a simillar “status” view at the bottom of Pull Requests on github.com. The problem I’m running into is with the creator data: specifically login and avatar_url.

It seems like it depends on the setup of the status webhook because some users look correct while others use my login + avatar.

As an example, take a look at the status creators on this PR.

Querying the V3 API:

https://api.github.com/repos/rnystrom/githawk/commits/067a3eecd085a1d0103419f7a36fd3b6e7dd073f/statuses

Trimming the response, notice how the first two creators are buddybuild[bot] and the last one is me when the web shows a Bitrise avatar.

[
  {
    "context": "GitHawk (iOS, Freetime - Release)",
    "creator": {
      "avatar_url": "https://avatars3.githubusercontent.com/in/2414?v=4",
      "login": "buddybuild[bot]",
    },
    "description": "Build succeeded",
    "state": "success",
  },
  {
    "context": "GitHawk (iOS, Freetime - Release)",
    "creator": {
      "avatar_url": "https://avatars3.githubusercontent.com/in/2414?v=4",
      "login": "buddybuild[bot]",
    },
    "description": "Build in progress",
    "state": "pending",
  },
  {
    "context": "ci/bitrise/a912ff037bca7072/push",
    "creator": {
      "avatar_url": "https://avatars2.githubusercontent.com/u/739696?v=4",
      "login": "rnystrom",
    },
    "description": "Passed - GitHawk",
    "state": "success",
  }
]

I get similar results if I use the GraphQL API:

{
  repository(owner: "rnystrom", name: "githawk") {
    pullRequest(number: 1549) {
      number
      title
      commits(last: 1) {
        nodes {
          commit {
            status {
              contexts {
                context
                description
                creator {
                  login
                  avatarUrl
                }
              }
            }
          }
        }
      }
    }
  }
}

#2

Hi @rnystrom,

It looks like the creator is correct here, but the way that the view is drawn in the GitHub application is that it relies on a field that is in our internal schema called application that lives on the StatusContext type.

I’ll look into if we can expose that information. For now, I’ve marked this as a schema request and added it to our internal tracker and will update you when we have any more information.