@@ -292,19 +292,15 @@ export class BareReviewsController extends React.Component {
292
292
addSingleComment = async ( commentBody , threadID , replyToID , commentPath , position , callbacks = { } ) => {
293
293
let pendingReviewID = null ;
294
294
try {
295
- console . log ( `setting state: postingToThreadID=${ threadID } ` ) ;
296
295
this . setState ( { postingToThreadID : threadID } ) ;
297
296
298
- console . log ( 'calling addReviewMutation' ) ;
299
297
const reviewResult = await addReviewMutation ( this . props . relay . environment , {
300
298
pullRequestID : this . props . pullRequest . id ,
301
299
viewerID : this . props . viewer . id ,
302
300
} ) ;
303
301
const reviewID = reviewResult . addPullRequestReview . reviewEdge . node . id ;
304
302
pendingReviewID = reviewID ;
305
- console . log ( `addReviewMutation returned: reviewID=${ reviewID } pendingReviewID=${ pendingReviewID } ` ) ;
306
303
307
- console . log ( 'calling addReviewCommentMutation' ) ;
308
304
const commentPromise = addReviewCommentMutation ( this . props . relay . environment , {
309
305
body : commentBody ,
310
306
inReplyTo : replyToID ,
@@ -314,36 +310,28 @@ export class BareReviewsController extends React.Component {
314
310
path : commentPath ,
315
311
position,
316
312
} ) ;
317
- console . log ( 'firing didSubmitComment callback' ) ;
318
313
if ( callbacks . didSubmitComment ) {
319
314
callbacks . didSubmitComment ( ) ;
320
315
}
321
- console . log ( 'awaiting comment promise' ) ;
322
316
await commentPromise ;
323
- console . log ( 'comment promise resolved successfully' ) ;
324
317
pendingReviewID = null ;
325
318
326
- console . log ( 'calling submitReviewMutation' ) ;
327
319
await submitReviewMutation ( this . props . relay . environment , {
328
320
event : 'COMMENT' ,
329
321
reviewID,
330
322
} ) ;
331
- console . log ( 'submitReviewMutation resolved successfully' ) ;
332
323
addEvent ( 'add-single-comment' , { package : 'github' } ) ;
333
324
} catch ( error ) {
334
- console . log ( `Caught an error: ${ error . stack } ` ) ;
335
325
if ( callbacks . didFailComment ) {
336
326
callbacks . didFailComment ( ) ;
337
327
}
338
328
339
329
if ( pendingReviewID !== null ) {
340
330
try {
341
- console . log ( 'Calling deleteReviewMutation' ) ;
342
331
await deleteReviewMutation ( this . props . relay . environment , {
343
332
reviewID : pendingReviewID ,
344
333
pullRequestID : this . props . pullRequest . id ,
345
334
} ) ;
346
- console . log ( 'deleteReviewMutation completed' ) ;
347
335
} catch ( e ) {
348
336
/* istanbul ignore else */
349
337
if ( error . errors && e . errors ) {
0 commit comments