Skip to content

Commit

Permalink
Add more debug info for PR comment workflow (#4063)
Browse files Browse the repository at this point in the history
* Add more info for comment workflow

* fix spacing

* add console.error

---------

Co-authored-by: Robert Snow <rsnow@adobe.com>
  • Loading branch information
LFDanLu and snowystinger authored Feb 15, 2023
1 parent 93b3c95 commit e9f0817
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .circleci/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

0 comments on commit e9f0817

Please sign in to comment.