[INFRA-142]

Reworked version of https://github.com/kohsuke/github-api/pull/133/files