Skip to content

Commit 09b5e42

Browse files
committed
add github URL support from env
1 parent 5b493b9 commit 09b5e42

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

commands/utils/dom.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ async function sendDoM(storybookUrl, stories, storybookConfig, options) {
6767
// form.append('commitAuthor', commit.author.name);
6868
// form.append('commitMessage', commit.subject);
6969

70+
githubURL = process.env.GITHUB_URL
71+
if (githubURL) {
72+
form.append('githubURL', githubURL);
73+
}
74+
7075
// Send DOM to render API
7176
await axios.post(constants[options.env].RENDER_API_URL, form, {
7277
headers: {

commands/utils/package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function checkUpdate(version, options) {
1616
}
1717
})
1818
.catch(function (error) {
19-
if (error.response) {
19+
if (error.response && error.response.data && error.response.data.error) {
2020
console.log('Cannot check for updates. Error: ' + error.response.data.error.message);
2121
} else {
2222
console.log('Cannot check for updates. Error: ' + error.message);

0 commit comments

Comments
 (0)