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) + } } }