buildkite / feedback

Got feedback? Please let us know!
https://buildkite.com
25 stars 24 forks source link

Include Github username in build metadata #466

Open melinath opened 5 years ago

melinath commented 5 years ago

Github webhooks include usernames in their data; we would like to be able to extract Github usernames from buildkite webhooks (for builds triggered by Github) so that we can use them to match build failures to specific users in a separate application.

(It would also be fine with us if this were included in creator information if that would be preferable to y'all.)

toolmantim commented 5 years ago

Good suggestion! Sounds like something a lot of people might want.

If you need something immediately, you can fetch the original webhook JSON string payload (sent by GitHub) using the GraphQL API:

query {
  build(slug:"$BUILDKITE_ORGANIZATION_SLUG/$BUILDKITE_PIPELINE_SLUG/$BUILDKITE_BUILD_NUMBER") {
    source {
      ... on BuildSourceWebhook {
        payload
      }
    }
  }
}
melinath commented 5 years ago

hmm, that's an interesting workaround, thanks