diff --git a/scripts/upload-bench.ts b/scripts/upload-bench.ts index d076fc3fff2b..6a30795ef1e0 100644 --- a/scripts/upload-bench.ts +++ b/scripts/upload-bench.ts @@ -89,8 +89,8 @@ const uploadBench = async () => { console.log('skip uploading results to github'); return; } - const [[base]]: any[] = await appTable.query({ - query: `SELECT * FROM \`storybook-benchmark.benchmark_results.bench2\` WHERE branch=@baseBranch AND label=@templateKey ORDER BY timestamp DESC LIMIT 1;`, + const [base]: any[] = await appTable.query({ + query: `SELECT * FROM \`storybook-benchmark.benchmark_results.bench2\` WHERE branch=@baseBranch AND label=@templateKey ORDER BY timestamp DESC LIMIT 20;`, params: { baseBranch, templateKey }, }); @@ -101,7 +101,7 @@ const uploadBench = async () => { owner: 'storybookjs', repo: 'storybook', issueNumber: prNumber, - base: { ...defaults, ...base }, + base: base.map((b: any) => ({ ...defaults, ...b })), head: row, }), })