Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
Signed-off-by: Nitishkumar Singh <nitish@cto.ai>
  • Loading branch information
nitishkumar71 committed Sep 28, 2023
1 parent cd23b36 commit fd25b61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18267,8 +18267,11 @@ const run = async (context) => {
core.setSecret(token)
core.setSecret(teamId)

const branch = core.getInput('branch') || (currentCtx.ref != null ? getBranchFromGithubRef(context.ref) : getBranch(eventName, payload))
const commit = core.getInput('commit') || (currentCtx.sha != null ? context.sha : getSha(eventName, payload))
console.log('== pull data from context ==')
console.log(`ref: ${currentCtx.ref}`)
console.log(`sha: ${currentCtx.sha}`)
const branch = core.getInput('branch') || (currentCtx.ref != null ? getBranchFromGithubRef(currentCtx.ref) : getBranch(eventName, payload))
const commit = core.getInput('commit') || (currentCtx.sha != null ? currentCtx.sha : getSha(eventName, payload))
const body = {
team_id: teamId,
event_name: core.getInput('event_name'),
Expand Down
2 changes: 2 additions & 0 deletions src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ const run = async (context) => {
repo: core.getInput('repo') || payload.repository.full_name,
meta: { user: login }
}
console.log('== Body ==')
console.dir(body)
return got.post('https://events.cto.ai/', {
headers: {
Authorization: `Bearer ${token}`,
Expand Down

0 comments on commit fd25b61

Please sign in to comment.