Skip to content

Commit e5be8ad

Browse files
committed
added branchname and commitmessage in response schema
1 parent 4ae649c commit e5be8ad

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

packages/sdk/src/index.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ describe('MermaidChart', () => {
182182
const jsonResponse = {
183183
title: 'Add validation step to flowchart',
184184
description: '## What changed\n- Added node C',
185+
branchName: 'feature/flowchart-validation',
186+
commitMessage: 'Add validation node C',
185187
};
186188

187189
// eslint-disable-next-line @typescript-eslint/no-explicit-any

packages/sdk/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ export class MermaidChart {
334334

335335
/**
336336
* Suggests a pull request title and body (markdown) from a before/after diagram diff (Mermaid AI).
337+
* The response also include `branchName` and `commitMessage`.
337338
*
338339
* @param request - `originalDiagram` and `editedDiagram` only
339340
* @throws {@link AICreditsLimitExceededError} if credits limit exceeded (HTTP 402)

packages/sdk/src/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,13 @@ export interface PrSummaryRequest {
105105
}
106106

107107
/**
108-
* Public response: suggested PR title and markdown description
108+
* Public response: suggested PR title and markdown description, branch name, and commit message.
109109
*/
110110
export interface PrSummaryResponse {
111111
title: string;
112112
description: string;
113+
branchName?: string;
114+
commitMessage?: string;
113115
}
114116

115117
/**

0 commit comments

Comments
 (0)