@@ -453,19 +453,17 @@ export class PRNode extends TreeNode implements CommentHandler, vscode.Commentin
453453
454454 // #region New Comment Thread
455455 async createEmptyCommentThread ( document : vscode . TextDocument , range : vscode . Range ) : Promise < void > {
456- if ( await this . _prManager . authenticate ( ) ) {
457- const inDraftMode = await this . _prManager . inDraftMode ( this . pullRequestModel ) ;
458- // threadIds must be unique, otherwise they will collide when vscode saves pending comment text. Assumes
459- // that only one empty thread can be created per line.
460- const threadId = document . uri . toString ( ) + range . start . line ;
461- const thread = this . _commentController ! . createCommentThread ( threadId , document . uri , range , [ ] ) ;
462- updateCommentThreadLabel ( thread ) ;
463- thread . collapsibleState = vscode . CommentThreadCollapsibleState . Expanded ;
464- let commands = getAcceptInputCommands ( thread , inDraftMode , this , this . pullRequestModel . githubRepository . supportsGraphQl ) ;
465- thread . acceptInputCommand = commands . acceptInputCommand ;
466- thread . additionalCommands = commands . additionalCommands ;
467- thread . deleteCommand = getDeleteThreadCommand ( thread ) ;
468- }
456+ const inDraftMode = await this . _prManager . inDraftMode ( this . pullRequestModel ) ;
457+ // threadIds must be unique, otherwise they will collide when vscode saves pending comment text. Assumes
458+ // that only one empty thread can be created per line.
459+ const threadId = document . uri . toString ( ) + range . start . line ;
460+ const thread = this . _commentController ! . createCommentThread ( threadId , document . uri , range , [ ] ) ;
461+ updateCommentThreadLabel ( thread ) ;
462+ thread . collapsibleState = vscode . CommentThreadCollapsibleState . Expanded ;
463+ let commands = getAcceptInputCommands ( thread , inDraftMode , this , this . pullRequestModel . githubRepository . supportsGraphQl ) ;
464+ thread . acceptInputCommand = commands . acceptInputCommand ;
465+ thread . additionalCommands = commands . additionalCommands ;
466+ thread . deleteCommand = getDeleteThreadCommand ( thread ) ;
469467 }
470468
471469 private async updateCommentThreadRoot ( thread : vscode . CommentThread , text : string ) : Promise < void > {
@@ -645,7 +643,7 @@ export class PRNode extends TreeNode implements CommentHandler, vscode.Commentin
645643
646644 // #region comment
647645 public async createOrReplyComment ( thread : vscode . CommentThread ) {
648- if ( await this . _prManager . authenticate ( ) && this . commentController ! . inputBox !== undefined ) {
646+ if ( this . commentController ! . inputBox !== undefined ) {
649647 if ( thread . comments . length ) {
650648 let comment = thread . comments [ 0 ] as ( vscode . Comment & { _rawComment : Comment } ) ;
651649 const rawComment = await this . _prManager . createCommentReply ( this . pullRequestModel , this . commentController ! . inputBox ! . value , comment . _rawComment ) ;
@@ -667,7 +665,7 @@ export class PRNode extends TreeNode implements CommentHandler, vscode.Commentin
667665 }
668666
669667 public async editComment ( thread : vscode . CommentThread , comment : vscode . Comment ) : Promise < void > {
670- if ( await this . _prManager . authenticate ( ) && this . _commentController ! . inputBox ) {
668+ if ( this . _commentController ! . inputBox ) {
671669 const fileChange = this . findMatchingFileNode ( thread . resource ) ;
672670 const existingComment = ( comment as ( vscode . Comment & { _rawComment : Comment } ) ) . _rawComment ;
673671 if ( ! existingComment ) {
0 commit comments