fix: debug with whole object
Some checks failed
Build Badges / Create Answer Badge (push) Failing after 2s
Build Badges / Create Color Range Badges (0) (push) Failing after 2s
Build Badges / Create Color Range Badges (10) (push) Failing after 2s
Build Badges / Create Color Range Badges (100) (push) Failing after 2s
Build Badges / Create Color Range Badges (20) (push) Failing after 2s
Build Badges / Create Color Range Badges (30) (push) Failing after 2s
Build Badges / Create Color Range Badges (40) (push) Failing after 2s
Build Badges / Create Color Range Badges (50) (push) Failing after 1s
Build Badges / Create Color Range Badges (60) (push) Failing after 1s
Build Badges / Create Color Range Badges (70) (push) Failing after 1s
Build Badges / Create Color Range Badges (80) (push) Failing after 1s
Build Badges / Create Color Range Badges (90) (push) Failing after 1s
Checks / Check REUSE (push) Successful in 5s

This commit is contained in:
2024-07-31 15:16:44 +12:00
parent 46dee54362
commit 2329d5dd80

View File

@@ -9,6 +9,8 @@
import core from "@actions/core";
import { makeBadge } from "badge-maker";
const util = require('util')
const hostUrl = new URL(core.getInput("host"));
// This uses the method above to update a gist with the given data. The user agent is
@@ -28,7 +30,7 @@ async function updateBadge(body) {
});
if (!response.ok) {
console.log(`Fetching badge failed: ${response}`);
console.log(`Fetching badge failed: ${console.log(util.inspect(response, false, null, true /* enable colors */))}`);
if (response.status === 409) {
// This means likely the badge already exists. Try to patch
response = await fetch(hostUrl, {