@@ -8,16 +8,7 @@ import type { SerializedBlock, SerializedWorkflow } from '@/serializer/types'
88
99const logger = createLogger ( 'InputResolver' )
1010
11- // Minimal fallback: if a property isn't found at the current level,
12- // attempt to resolve it from a nested `github` alias commonly present in webhook payloads.
13- function resolveWithGithubAlias ( container : any , property : string ) : any {
14- if ( ! container || typeof container !== 'object' ) return undefined
15- const nested = container . github
16- if ( nested && typeof nested === 'object' && Object . prototype . hasOwnProperty . call ( nested , property ) ) {
17- return nested [ property ]
18- }
19- return undefined
20- }
11+ // Removed provider alias fallbacks (e.g., nested `github`).
2112
2213// Fallback into webhook metadata payload if present: { webhook: { data: { payload: {...} } } }
2314function resolveFromWebhookPayload ( container : any , property : string ) : any {
@@ -547,10 +538,7 @@ export class InputResolver {
547538 // This enables direct access to <start.input> and <start.conversationId>
548539 let replacementValue : any = blockState . output
549540
550- // Merge nested github object onto root to make <block.repository> resolve transparently
551- if ( replacementValue && typeof replacementValue === 'object' && replacementValue . github && typeof replacementValue . github === 'object' ) {
552- replacementValue = { ...replacementValue . github , ...replacementValue }
553- }
541+ // Do not merge nested provider aliases. Expect payload fields at the root.
554542
555543 for ( const part of pathParts ) {
556544 if ( ! replacementValue || typeof replacementValue !== 'object' ) {
@@ -585,15 +573,11 @@ export class InputResolver {
585573
586574 replacementValue = arrayValue [ index ]
587575 } else {
588- // Regular property access with a GitHub alias fallback
576+ // Regular property access with webhook metadata fallback only
589577 let nextValue = resolvePropertyAccess ( replacementValue , part )
590578 if ( nextValue === undefined ) {
591- // Fallback to nested github alias if present
592- nextValue = resolveWithGithubAlias ( replacementValue , part )
593- if ( nextValue === undefined ) {
594- // Fallback to webhook metadata payload if present
595- nextValue = resolveFromWebhookPayload ( replacementValue , part )
596- }
579+ // Fallback to webhook metadata payload if present
580+ nextValue = resolveFromWebhookPayload ( replacementValue , part )
597581 }
598582 replacementValue = nextValue
599583 }
@@ -765,10 +749,7 @@ export class InputResolver {
765749
766750 let replacementValue : any = blockState . output
767751
768- // Merge nested github object onto root to make <block.repository> resolve transparently
769- if ( replacementValue && typeof replacementValue === 'object' && replacementValue . github && typeof replacementValue . github === 'object' ) {
770- replacementValue = { ...replacementValue . github , ...replacementValue }
771- }
752+ // Do not merge nested provider aliases. Expect payload fields at the root.
772753
773754 for ( const part of pathParts ) {
774755 if ( ! replacementValue || typeof replacementValue !== 'object' ) {
@@ -800,15 +781,11 @@ export class InputResolver {
800781
801782 replacementValue = arrayValue [ index ]
802783 } else {
803- // Regular property access with a GitHub alias fallback
784+ // Regular property access with webhook metadata fallback only
804785 let nextValue = resolvePropertyAccess ( replacementValue , part )
805786 if ( nextValue === undefined ) {
806- // Fallback to nested github alias if present
807- nextValue = resolveWithGithubAlias ( replacementValue , part )
808- if ( nextValue === undefined ) {
809- // Fallback to webhook metadata payload if present
810- nextValue = resolveFromWebhookPayload ( replacementValue , part )
811- }
787+ // Fallback to webhook metadata payload if present
788+ nextValue = resolveFromWebhookPayload ( replacementValue , part )
812789 }
813790 replacementValue = nextValue
814791 }
0 commit comments