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.
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!
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.
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.
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.
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.