forked from adobe/react-spectrum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomment.js
More file actions
25 lines (20 loc) · 821 Bytes
/
Copy pathcomment.js
File metadata and controls
25 lines (20 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const Octokit = require('@octokit/rest');
const octokit = new Octokit({
auth: `token ${process.env.GITHUB_TOKEN}`
});
run();
async function run() {
if (!process.env.CIRCLE_PULL_REQUEST) {
return;
}
let pr = process.env.CIRCLE_PULL_REQUEST.split('/').pop();
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 documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)`
});
}