Skip to content

Commit 10f0508

Browse files
Adam GoughAdam Gough
authored andcommitted
github fix test
1 parent 782bfd6 commit 10f0508

2 files changed

Lines changed: 115 additions & 385 deletions

File tree

apps/sim/components/ui/tag-dropdown.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ const getOutputTypeForPath = (
109109

110110
if (firstTrigger?.outputs) {
111111
const pathParts = outputPath.split('.')
112-
let currentObj: any = firstTrigger.outputs
112+
// If outputs are wrapped under the provider name (e.g., github), flatten by default
113+
let currentObj: any =
114+
(firstTrigger.provider && firstTrigger.outputs[firstTrigger.provider]) ||
115+
firstTrigger.outputs
113116

114117
for (const part of pathParts) {
115118
if (currentObj && typeof currentObj === 'object') {
@@ -690,8 +693,13 @@ export const TagDropdown: React.FC<TagDropdownProps> = ({
690693
const firstTrigger = triggers[0]
691694

692695
if (firstTrigger?.outputs) {
693-
// Use trigger outputs instead of block outputs
694-
const outputPaths = generateOutputPaths(firstTrigger.outputs)
696+
// Use trigger outputs instead of block outputs.
697+
// If the outputs are wrapped under the provider name (e.g., github),
698+
// flatten so users can reference <block.repository> rather than <block.github.repository>.
699+
const providerWrapped =
700+
firstTrigger.provider && firstTrigger.outputs[firstTrigger.provider]
701+
const outputsToUse = providerWrapped || firstTrigger.outputs
702+
const outputPaths = generateOutputPaths(outputsToUse)
695703
blockTags = outputPaths.map((path) => `${normalizedBlockName}.${path}`)
696704
} else {
697705
const outputPaths = generateOutputPaths(blockConfig.outputs || {})

0 commit comments

Comments
 (0)