GitHub Event payload forwarding?

Sorry, I know this is a super old thread, and apologies we didn’t get to it sooner — but we wanted to check in and see if you figured this out?

There is a sneaky way to access the full webhook we received using the graphql api. Here’s a query which should work:

query {
  pipeline(slug: "my-org/my-pipeline") {
    builds(first: 10) {
      edges {
        node {
          source {
            name
            ...on BuildSourceWebhook {
              uuid
              headers
              payload
            }
          }
        }
      }
    }
  }
}

within a build or job you should be able to use the job’s $BUILDKITE_BUILD_ID environment variable in this query:

query {
  build(uuid: "$BUILDKITE_BUILD_ID") {
    source {
      name
      ...on BuildSourceWebhook {
        uuid
        headers
        payload
      }
    }
  }
}