✨ Add custom timeout argument to git commit script
This commit is contained in:
@@ -32,7 +32,9 @@ export async function howto(message: string): Promise<string> {
|
||||
return (await response.json())["data"]["summary"];
|
||||
}
|
||||
|
||||
export async function summarizeGitStatusDiff(): Promise<string> {
|
||||
export async function summarizeGitStatusDiff(
|
||||
timeoutMillis?: number,
|
||||
): Promise<string> {
|
||||
const gitStatus = (await execCommand("git", ["status"]))
|
||||
.assertSuccess().getStdoutAsStringThenTrim();
|
||||
const gitDiff = (await execCommand("git", ["diff"]))
|
||||
@@ -50,7 +52,7 @@ export async function summarizeGitStatusDiff(): Promise<string> {
|
||||
"gitStatus": gitStatus,
|
||||
"gitDiff": gitDiff,
|
||||
}),
|
||||
timeoutMillis: 30_000,
|
||||
timeoutMillis: timeoutMillis ?? 30_000,
|
||||
},
|
||||
);
|
||||
if (response.status != 200) {
|
||||
|
||||
Reference in New Issue
Block a user