Skip to content

Commit

Permalink
Fix log_url / target_url
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Sep 30, 2021
1 parent 0ed6cdc commit 175bc3b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ function run() {
const defaultUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha}/checks`;
const token = core.getInput('token', { required: true });
const url = core.getInput('target_url', { required: false }) || defaultUrl;
const logUrl = core.getInput('log_url', { required: false }) || defaultUrl;
const description = core.getInput('description', { required: false }) || '';
const deploymentId = core.getInput('deployment_id');
const environmentUrl = core.getInput('environment_url', { required: false }) || '';
Expand All @@ -46,7 +45,7 @@ function run() {
previews: ['flash', 'ant-man'],
log: console
});
const deployment = yield client.rest.repos.createDeploymentStatus(Object.assign(Object.assign({}, context.repo), { deployment_id: parseInt(deploymentId), state, log_url: logUrl, target_url: url, description, environment_url: environmentUrl }));
const deployment = yield client.rest.repos.createDeploymentStatus(Object.assign(Object.assign({}, context.repo), { deployment_id: parseInt(deploymentId), state, log_url: url, description, environment_url: environmentUrl }));
console.log({ deployment });
}
catch (error) {
Expand Down
4 changes: 1 addition & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ async function run() {

const token = core.getInput('token', {required: true})
const url = core.getInput('target_url', {required: false}) || defaultUrl
const logUrl = core.getInput('log_url', {required: false}) || defaultUrl
const description = core.getInput('description', {required: false}) || ''
const deploymentId = core.getInput('deployment_id')
const environmentUrl =
Expand All @@ -33,8 +32,7 @@ async function run() {
...context.repo,
deployment_id: parseInt(deploymentId),
state,
log_url: logUrl,
target_url: url,
log_url: url,
description,
environment_url: environmentUrl
})
Expand Down

0 comments on commit 175bc3b

Please sign in to comment.