Skip to content

Commit

Permalink
👌 Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-anderson committed Apr 28, 2021
1 parent eefc830 commit 7017c5f
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@ try {
const branch = core.getInput('branch')
const ref = core.getInput('ref')

fetch(
`https://layerci.com/api/v1/run/${repoName}?layertoken=${apiKey}`,
{
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'branch': branch,
'ref': ref,
'accept_buttons': buttons,
'extra': apiExtra,
}),
}
).then(res => res.json()).then(json => console.log(json))

const url = `https://layerci.com/api/v1/run/${repoName}?layertoken=${apiKey}`
const payload =
{
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'branch': branch,
'ref': ref,
'accept_buttons': buttons,
'extra': apiExtra,
}),
}

fetch(url,payload).then(res => res.json()).then(json => console.log(json))
console.log(url)
console.log({payload})

} catch (error) {
core.setFailed(`Action failed with error ${error}`);
Expand Down

0 comments on commit 7017c5f

Please sign in to comment.