You've already forked dynamic-badges-action
🎉 Add host parameter
This commit is contained in:
@@ -19,6 +19,10 @@ inputs:
|
|||||||
message:
|
message:
|
||||||
description: 'The right text of the badge'
|
description: 'The right text of the badge'
|
||||||
required: true
|
required: true
|
||||||
|
host:
|
||||||
|
description: 'The base URL of the gist API'
|
||||||
|
default: 'https://api.github.com/gists/'
|
||||||
|
required: false
|
||||||
forceUpdate:
|
forceUpdate:
|
||||||
description: 'If set to true, the gist will be updated even if the content did not change'
|
description: 'If set to true, the gist will be updated even if the content did not change'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
|||||||
5
index.js
5
index.js
@@ -7,10 +7,7 @@
|
|||||||
import core from '@actions/core';
|
import core from '@actions/core';
|
||||||
import { makeBadge } from 'badge-maker';
|
import { makeBadge } from 'badge-maker';
|
||||||
|
|
||||||
const gistUrl = new URL(
|
const gistUrl = new URL(core.getInput('gistID'), core.getInput('host'));
|
||||||
core.getInput('gistID'),
|
|
||||||
'https://api.github.com/gists/'
|
|
||||||
);
|
|
||||||
|
|
||||||
// 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
|
||||||
// required as defined in https://developer.github.com/v3/#user-agent-required
|
// required as defined in https://developer.github.com/v3/#user-agent-required
|
||||||
|
|||||||
Reference in New Issue
Block a user