chore: make webhooks workflow-agnostic (#29404)

This commit is contained in:
Ben Beckford 2026-06-30 12:27:30 -07:00 committed by GitHub
parent 165bca4b0a
commit 6a7a34d294
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,7 +150,7 @@ const methods = wrapper<Manifest>({
changes: { asset: { visibility: config.visibility as AssetVisibility } },
}),
webhook: ({ config, data, functions }) => {
webhook: ({ config, data, functions, type, trigger }) => {
const headers: Record<string, string> = {
'Content-Type': 'application/json',
};
@ -161,7 +161,11 @@ const methods = wrapper<Manifest>({
functions.httpRequest(config.url, {
method: config.method ?? 'POST',
body: JSON.stringify(data.asset),
body: JSON.stringify({
type,
trigger,
data,
}),
headers,
});