Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 42 additions & 9 deletions src/github/runAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,32 @@ interface ActionRunContext {
changedFiles?: ChangedFiles;
}

function getProgressSteps(createIssues: boolean): string[] {
if (createIssues) {
return [
'🔍 Gather context',
'🧠 Generate feature plan',
'📌 Create issues',
'🏁 Wrap up',
];
}

return [
'🔍 Gather context',
'✨ Apply edits',
'🧪 Review changes',
'🏁 Wrap up',
];
}

function createRunContext(
config: ActionConfig,
processedEvent: ProcessedEvent,
): ActionRunContext {
return {
config,
processedEvent,
progressSteps: ['🔍 Gather context', '📝 Plan', '✨ Apply edits', '🏁 Wrap up'],
progressSteps: getProgressSteps(processedEvent.createIssues),
downloadedImageFiles: [],
};
}
Expand Down Expand Up @@ -241,6 +259,22 @@ async function executeAction(runCtx: ActionRunContext): Promise<ActionPhaseResul
runCtx.output,
runCtx.progressCommentId,
);
await safeUpdateProgress(
octokit,
repo,
agentEvent.github,
runCtx.progressCommentId,
progressSteps,
2,
);
await safeUpdateProgress(
octokit,
repo,
agentEvent.github,
runCtx.progressCommentId,
progressSteps,
3,
);
return 'success';
}

Expand All @@ -256,6 +290,13 @@ async function executeAction(runCtx: ActionRunContext): Promise<ActionPhaseResul
progressSteps,
2,
);
await handleResult(
config,
processedEvent,
runCtx.output,
runCtx.changedFiles,
runCtx.progressCommentId,
);
await safeUpdateProgress(
octokit,
repo,
Expand All @@ -265,14 +306,6 @@ async function executeAction(runCtx: ActionRunContext): Promise<ActionPhaseResul
3,
);

await handleResult(
config,
processedEvent,
runCtx.output,
runCtx.changedFiles,
runCtx.progressCommentId,
);

return 'success';
}

Expand Down