🎉 Add host parameter

This commit is contained in:
Simon Schneegans
2023-10-07 18:49:27 +02:00
parent efee8f7380
commit 606d12105c
2 changed files with 5 additions and 4 deletions

View File

@@ -19,6 +19,10 @@ inputs:
message:
description: 'The right text of the badge'
required: true
host:
description: 'The base URL of the gist API'
default: 'https://api.github.com/gists/'
required: false
forceUpdate:
description: 'If set to true, the gist will be updated even if the content did not change'
default: 'false'

View File

@@ -7,10 +7,7 @@
import core from '@actions/core';
import { makeBadge } from 'badge-maker';
const gistUrl = new URL(
core.getInput('gistID'),
'https://api.github.com/gists/'
);
const gistUrl = new URL(core.getInput('gistID'), core.getInput('host'));
// This uses the method above to update a gist with the given data. The user agent is
// required as defined in https://developer.github.com/v3/#user-agent-required