From e9f08177302590b4bf8c650dda579a15f0c5ffcb Mon Sep 17 00:00:00 2001 From: Daniel Lu Date: Wed, 15 Feb 2023 09:42:36 -0800 Subject: [PATCH] Add more debug info for PR comment workflow (#4063) * Add more info for comment workflow * fix spacing * add console.error --------- Co-authored-by: Robert Snow --- .circleci/comment.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.circleci/comment.js b/.circleci/comment.js index cd84dfc46e3..4273bf11391 100644 --- a/.circleci/comment.js +++ b/.circleci/comment.js @@ -63,18 +63,22 @@ async function run() { } else { pr = process.env.CIRCLE_PULL_REQUEST.split('/').pop(); } - + console.log('PR number to comment on', pr); if (pr != null) { - await octokit.issues.createComment({ - owner: 'adobe', - repo: 'react-spectrum', - issue_number: pr, - body: `Build successful! 🎉 + try { + await octokit.issues.createComment({ + owner: 'adobe', + repo: 'react-spectrum', + issue_number: pr, + body: `Build successful! 🎉 * [View the storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html) * [View the storybook-17](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-17/index.html) * [View the storybook-16](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-16/index.html) * [View the documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)` - }); + }); + } catch (err) { + console.error(err) + } } }