Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 86a8dd2

Browse files
committed
Tidy up console statements
1 parent 4693a13 commit 86a8dd2

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/controllers/reviews-controller.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,15 @@ export class BareReviewsController extends React.Component {
292292
addSingleComment = async (commentBody, threadID, replyToID, commentPath, position, callbacks = {}) => {
293293
let pendingReviewID = null;
294294
try {
295-
console.log(`setting state: postingToThreadID=${threadID}`);
296295
this.setState({postingToThreadID: threadID});
297296

298-
console.log('calling addReviewMutation');
299297
const reviewResult = await addReviewMutation(this.props.relay.environment, {
300298
pullRequestID: this.props.pullRequest.id,
301299
viewerID: this.props.viewer.id,
302300
});
303301
const reviewID = reviewResult.addPullRequestReview.reviewEdge.node.id;
304302
pendingReviewID = reviewID;
305-
console.log(`addReviewMutation returned: reviewID=${reviewID} pendingReviewID=${pendingReviewID}`);
306303

307-
console.log('calling addReviewCommentMutation');
308304
const commentPromise = addReviewCommentMutation(this.props.relay.environment, {
309305
body: commentBody,
310306
inReplyTo: replyToID,
@@ -314,36 +310,28 @@ export class BareReviewsController extends React.Component {
314310
path: commentPath,
315311
position,
316312
});
317-
console.log('firing didSubmitComment callback');
318313
if (callbacks.didSubmitComment) {
319314
callbacks.didSubmitComment();
320315
}
321-
console.log('awaiting comment promise');
322316
await commentPromise;
323-
console.log('comment promise resolved successfully');
324317
pendingReviewID = null;
325318

326-
console.log('calling submitReviewMutation');
327319
await submitReviewMutation(this.props.relay.environment, {
328320
event: 'COMMENT',
329321
reviewID,
330322
});
331-
console.log('submitReviewMutation resolved successfully');
332323
addEvent('add-single-comment', {package: 'github'});
333324
} catch (error) {
334-
console.log(`Caught an error: ${error.stack}`);
335325
if (callbacks.didFailComment) {
336326
callbacks.didFailComment();
337327
}
338328

339329
if (pendingReviewID !== null) {
340330
try {
341-
console.log('Calling deleteReviewMutation');
342331
await deleteReviewMutation(this.props.relay.environment, {
343332
reviewID: pendingReviewID,
344333
pullRequestID: this.props.pullRequest.id,
345334
});
346-
console.log('deleteReviewMutation completed');
347335
} catch (e) {
348336
/* istanbul ignore else */
349337
if (error.errors && e.errors) {

0 commit comments

Comments
 (0)