Skip to content

Commit

Permalink
chore: add more debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ImLunaHey committed Mar 1, 2024
1 parent 4c7546c commit 690a6c1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
19 changes: 11 additions & 8 deletions dist/index.js

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

23 changes: 14 additions & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,27 @@ export async function run(): Promise<void> {
// Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true
core.debug('Sending annotation to Axiom')

const body = {
type: 'deploy',
time: new Date().toISOString(),

datasets,
title,
description,
url
}

// Log the annotation details
core.debug(`Annotation: ${JSON.stringify(body)}`)

// Send the annotation to Axiom
const response = await fetch('https://api.axiom.co/v2/annotations', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`
},
body: JSON.stringify({
type: 'deploy',
time: new Date().toISOString(),

datasets,
title,
description,
url
})
body: JSON.stringify(body)
})

// Throw an error if the request fails
Expand Down

0 comments on commit 690a6c1

Please sign in to comment.