Skip to content

Commit 10f9da7

Browse files
committed
chore(github): use TSDoc for the new wiring comments
1 parent 2901b97 commit 10f9da7

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎apps/sim/blocks/blocks/github.param-wiring.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
*/
44
import { describe, expect, it, vi } from 'vitest'
55

6-
// vitest.setup.ts stubs `@/tools/registry` to an empty map so unrelated suites
7-
// do not pay to load every tool. This suite asserts against the REAL tool
8-
// params, so it opts back in.
6+
/**
7+
* Uses the real tool registry: these assertions are about the params GitHub's
8+
* tools actually declare, which the global `@/tools/registry` mock in
9+
* vitest.setup.ts empties.
10+
*/
911
vi.unmock('@/tools/registry')
1012

1113
import { GitHubBlock, GitHubV2Block } from '@/blocks/blocks/github'

‎apps/sim/blocks/blocks/github.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,8 +2311,12 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
23112311
if (params.fork_name) result.name = params.fork_name
23122312
if (params.fork_sort) result.sort = params.fork_sort
23132313

2314-
// A dropdown stores its option id, so this arrives as the string
2315-
// 'true'/'false' while the tool declares `public` as a boolean.
2314+
/**
2315+
* A dropdown stores its option id, so this arrives as the string
2316+
* 'true'/'false' while the tool declares `public` as a boolean. The
2317+
* generic handler only JSON-parses `json`/`array` inputs, so nothing
2318+
* else coerces it.
2319+
*/
23162320
if (params.gist_public) {
23172321
result.public = params.gist_public === true || params.gist_public === 'true'
23182322
}

0 commit comments

Comments
 (0)