Skip to content

Commit c1b5f77

Browse files
committed
fix(confluence): dry-run echo accepts a numeric space id
1 parent 7ef574c commit c1b5f77

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎apps/sim/tools/confluence/create_page.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const confluenceCreatePageTool: InternalToolConfig<
109109
* picks the space's homepage); its id is a placeholder.
110110
*/
111111
dryRunOutput: (params) => {
112-
const spaceId = params.spaceId.trim()
112+
const spaceId = String(params.spaceId).trim()
113113
return {
114114
pageId: dryRunId('page'),
115115
title: params.title,

‎apps/sim/tools/dry-run.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,18 @@ describe('a dry run’s placeholder for an unsent write', () => {
219219
expect(returned).toMatchObject({ data: { chat: { id: -1001234 } } })
220220
})
221221

222+
it('echoes a Confluence space named by a numeric id given as a number', async () => {
223+
const returned = await placeholderFor('confluence_create_page', {
224+
accessToken: SECRET,
225+
domain: 'acme.atlassian.net',
226+
spaceId: 12345,
227+
title: 'Notes',
228+
content: '<p>x</p>',
229+
})
230+
231+
expect(returned.spaceId).toBe('12345')
232+
})
233+
222234
it('samples a file list a placeholder cannot hold as empty', async () => {
223235
const returned = await placeholderFor('slack_message', {
224236
accessToken: SECRET,

0 commit comments

Comments
 (0)