Skip to content

Commit

Permalink
refactor: adjust conditional deploymentName
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanLovely committed Aug 10, 2020
1 parent 506f39d commit 43c7cb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1360,10 +1360,8 @@ async function run() {
core.warning('get preview-url error');
}

let deploymentName = vercelProjectName;
if (!deploymentName) {
deploymentName = await vercelInspect(deploymentUrl);
}
const deploymentName =
vercelProjectName || (await vercelInspect(deploymentUrl));
if (deploymentName) {
core.info('set preview-name output');
core.setOutput('preview-name', deploymentName);
Expand Down
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,8 @@ async function run() {
core.warning('get preview-url error');
}

let deploymentName = vercelProjectName;
if (!deploymentName) {
deploymentName = await vercelInspect(deploymentUrl);
}
const deploymentName =
vercelProjectName || (await vercelInspect(deploymentUrl));
if (deploymentName) {
core.info('set preview-name output');
core.setOutput('preview-name', deploymentName);
Expand Down

0 comments on commit 43c7cb0

Please sign in to comment.