So, after a little debugging why I was getting 401's, I discovered that the JWT token payload was not valid. This was the response from Github:
{"message":"'Expiration time' claim ('exp') must be a numeric value representing the future time at which the assertion expires","documentation_url":"https://developer.github.com/v3"}
So, after a little debugging why I was getting 401's, I discovered that the JWT token payload was not valid. This was the response from Github:
Doing
int(time.time())
solved it here: https://github.com/uw-ipd/github-checks-buildkite-plugin/blob/master/ghapp/ghapp/github/identity.py#L87