Skip to content

Commit e9f0817

Browse files
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 <rsnow@adobe.com>
1 parent 93b3c95 commit e9f0817

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.circleci/comment.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,22 @@ async function run() {
6363
} else {
6464
pr = process.env.CIRCLE_PULL_REQUEST.split('/').pop();
6565
}
66-
66+
console.log('PR number to comment on', pr);
6767
if (pr != null) {
68-
await octokit.issues.createComment({
69-
owner: 'adobe',
70-
repo: 'react-spectrum',
71-
issue_number: pr,
72-
body: `Build successful! 🎉
68+
try {
69+
await octokit.issues.createComment({
70+
owner: 'adobe',
71+
repo: 'react-spectrum',
72+
issue_number: pr,
73+
body: `Build successful! 🎉
7374
7475
* [View the storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html)
7576
* [View the storybook-17](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-17/index.html)
7677
* [View the storybook-16](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-16/index.html)
7778
* [View the documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)`
78-
});
79+
});
80+
} catch (err) {
81+
console.error(err)
82+
}
7983
}
8084
}

0 commit comments

Comments
 (0)