# GitHub Event payload forwarding?

**URL:** <https://forum.buildkite.community/t/github-event-payload-forwarding/681>\
**Category:** General\
**Created:** [August 30, 2019, 8:54pm UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681 "2019-08-30T20:54:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwarner112](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jwarner112/32/643_2.png) [@jwarner112](https://forum.buildkite.community/u/jwarner112)\
**Post date:** [August 30, 2019, 8:54pm UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/1 "2019-08-30T20:54:01Z")

</div>

All my searching around revealed no previous issues of this type.

I’m looking for the ability to access and tailor my pipelines’ behavior around the contents of the GitHub Event payload. I can’t find any way, in any Buildkite documentation nor in rooting through the pipeline settings, to actually observe the payload that fires it off. Any level of access would  
suffice, even if just passing the blob as an envar to the agents.

I’m wondering if this is something that can be done, or if it’s planned anywhere? If it’s not, I’ll resubmit this as a feature request.

---

<div class="post-metadata">

**Author:** ![sj26](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/sj26/32/17_2.png) [@sj26](https://forum.buildkite.community/u/sj26)\
**Post date:** [March 27, 2020, 2:53am UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/2 "2020-03-27T02:53:50Z")

</div>

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](https://buildkite.com/docs/apis/graphql-api). Here’s a query which should work:

```auto
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:

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

```

---

<div class="post-metadata">

**Author:** ![jwarner112](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jwarner112/32/643_2.png) [@jwarner112](https://forum.buildkite.community/u/jwarner112)\
**Post date:** [March 29, 2020, 11:30pm UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/3 "2020-03-29T23:30:30Z")

</div>

Hey there!

Since posting this, I’m no longer with the company that had me facing this issue. However, I do appreciate your getting back to me and see this as a prime example of why I’ve enjoyed working in/with Buildkite. I’m hoping to be able to continue using it in the future!

---

<div class="post-metadata">

**Author:** ![tigris](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/tigris/32/826_2.png) [@tigris](https://forum.buildkite.community/u/tigris)\
**Post date:** [June 29, 2020, 12:47am UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/4 "2020-06-29T00:47:08Z")

</div>

Whilst the graphql solution provided does work, it requires a personal API token to run the query.

I’d like to run this query as part of my pipeline, on an agent, and not have to ship my personal token to all the agents.

The reason I would like to run this query, is to get the output from payload, as it has the juicy “compare” link in it, which knows nice info about how many commits were in this payload. Which I believe is since the last time a webhook was sent.

Basically what I want to solve, is something other CI systems have already, which is the ability to run certain steps if certain files were changed as part of this payload event. I was hoping I could implement this is a local hook quite easily, if I had access to the data from the github payload.

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jason/32/742_2.png) [@Jason](https://forum.buildkite.community/u/Jason)\
**Post date:** [June 29, 2020, 6:00am UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/5 "2020-06-29T06:00:55Z")

</div>

Hey @tigris,

Thanks for posting and welcome!

Yeah, thats not something we can do at the moment, but it’s a really great use case! I will take this feedback and share it with the team and see if it’s something we can do.

---

<div class="post-metadata">

**Author:** ![Valkum](https://avatars.discourse-cdn.com/v4/letter/v/96bed5/32.png) [@Valkum](https://forum.buildkite.community/u/Valkum)\
**Post date:** [June 26, 2024, 7:56pm UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/6 "2024-06-26T19:56:21Z")

</div>

Is there any progress on this? We need access to the before sha on a push event to be able to use monorepo diff with a linear git history.  
It seems the GraphQL API is the only way to obtain the before field from the GitHub webhook. Similarly, we want to avoid placing Buildkite tokens on the runners.

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [June 26, 2024, 10:45pm UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/7 "2024-06-26T22:45:29Z")

</div>

Hey! 👋

We don’t have any news on this particular request. Our product team is currently focusing on other priorities that are essential for our roadmap.

For now, the API remains the only available option to achieve the functionality you are looking for, although it’s understandable you don’t want to have a personal token for this.

---

<div class="post-metadata">

**Author:** ![Valkum](https://avatars.discourse-cdn.com/v4/letter/v/96bed5/32.png) [@Valkum](https://forum.buildkite.community/u/Valkum)\
**Post date:** [November 4, 2025, 1:47pm UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/8 "2025-11-04T13:47:19Z")

</div>

Hey, I want to bring this up again.

You recently added support for GitHub Merge Queues.

This brought support for `if_changed` based on ``build.merge_queue.base_commit``.

It would be nice if we can get first party support for simple pushes as well. GitHub provides these in the webhook, and in mono repos it makes sense to only trigger parts of a CD pipeline if they are costly or slow.

---

<div class="post-metadata">

**Author:** ![Micheal](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/micheal/32/1588_2.png) [@Micheal](https://forum.buildkite.community/u/Micheal)\
**Post date:** [November 4, 2025, 3:24pm UTC](https://forum.buildkite.community/t/github-event-payload-forwarding/681/9 "2025-11-04T15:24:37Z")

</div>

Hi @Valkum please can you send this to us via [support@buildkite.com](mailto:support@buildkite.com) so we can review this further and gather more information on your use case and context. Thanks a lot!
