You've already forked dynamic-badges-action
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
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:
4
index.js
4
index.js
@@ -9,6 +9,8 @@
|
|||||||
import core from "@actions/core";
|
import core from "@actions/core";
|
||||||
import { makeBadge } from "badge-maker";
|
import { makeBadge } from "badge-maker";
|
||||||
|
|
||||||
|
const util = require('util')
|
||||||
|
|
||||||
const hostUrl = new URL(core.getInput("host"));
|
const hostUrl = new URL(core.getInput("host"));
|
||||||
|
|
||||||
// This uses the method above to update a gist with the given data. The user agent is
|
// 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) {
|
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) {
|
if (response.status === 409) {
|
||||||
// This means likely the badge already exists. Try to patch
|
// This means likely the badge already exists. Try to patch
|
||||||
response = await fetch(hostUrl, {
|
response = await fetch(hostUrl, {
|
||||||
|
|||||||
Reference in New Issue
Block a user