@@ -11,6 +11,7 @@ export const issueCommentHandler = async (octokit: Octokit, chatOpService: ChatO
1111 const issueCommentPayload = context . payload as IssueCommentEvent ;
1212 if ( issueCommentPayload . action === 'created' ) {
1313 const comment = issueCommentPayload . comment . body ;
14+ let updatedComment = comment ;
1415 core . debug ( `Comment: ${ comment } ` ) ;
1516 const chatOpCommand = getChatOpCommand ( chatOpService , comment ) ;
1617
@@ -19,6 +20,14 @@ export const issueCommentHandler = async (octokit: Octokit, chatOpService: ChatO
1920 process . exit ( core . ExitCode . Success ) ;
2021 }
2122
23+ updatedComment += '\n1. Creating the branch in ADO...' ;
24+
25+ await octokit . rest . issues . updateComment ( {
26+ ...context . issue ,
27+ comment_id : issueCommentPayload . comment . id ,
28+ body : updatedComment
29+ } ) ;
30+
2231 const params = getParameters ( chatOpService , chatOpCommand , comment ) ;
2332
2433 resultMessage = await azureDevOpsService . createBranch ( {
@@ -29,10 +38,12 @@ export const issueCommentHandler = async (octokit: Octokit, chatOpService: ChatO
2938 branchType : params [ '-type' ]
3039 } ) ;
3140
32- await octokit . rest . issues . createComment ( {
41+ updatedComment += `\n1. ${ resultMessage } ` ;
42+
43+ await octokit . rest . issues . updateComment ( {
3344 ...context . issue ,
34- issue_number : context . issue . number ,
35- body : resultMessage || 'There was nothing to do!'
45+ comment_id : issueCommentPayload . comment . id ,
46+ body : updatedComment
3647 } ) ;
3748 }
3849 return resultMessage ;
0 commit comments