GitHub Status API has user avatar instead of application avatar

Hello!

We have a GitHub App in use within our continuous integration application.

Since the GitHub App api is marked unstable, we don’t use it to update Statuses for user’s commits/PR’s.

Instead, we use the v3 status api, and make calls with the user’s oAuth token.

The problem is that the repository status contains the user’s avatar and does not contain the the image for our application, which is a bit confusing.

I don’t see any API parameters to over-ride that. Getting a status shows there’s an avatar_url parameter, but I can’t set that when creating a status it seems.

What can I do to show our application image instead of the user avatar (presumably this is the user based on the oAuth token used to make the API call) ?

1 Like

Yes, you’re right, this is because you’re using the user’s OAuth token. When you authenticate using OAuth, you are essentially pretending to be that user on GitHub. Because of this, any actions you take when authenticated this way count as being performed by that user. Since GitHub believes that those actions were performed by that user (or, more accurately, on behalf of that user), it displays that user’s avatar. If you want to see the app’s avatar, you’ll have to authenticate as the app itself and not the user.

I hope that helps!