You've already forked dynamic-badges-action
🔧 Use camel case
This commit is contained in:
20
action.yml
20
action.yml
@@ -7,10 +7,10 @@ inputs:
|
|||||||
auth:
|
auth:
|
||||||
description: 'Your secret with the gist scope'
|
description: 'Your secret with the gist scope'
|
||||||
required: true
|
required: true
|
||||||
gist-id:
|
gistID:
|
||||||
description: 'The ID of the gist to use'
|
description: 'The ID of the gist to use'
|
||||||
required: true
|
required: true
|
||||||
badge-name:
|
filename:
|
||||||
description: 'The *.json filename of the badge data'
|
description: 'The *.json filename of the badge data'
|
||||||
required: true
|
required: true
|
||||||
label:
|
label:
|
||||||
@@ -19,34 +19,34 @@ inputs:
|
|||||||
message:
|
message:
|
||||||
description: 'The right text of the badge'
|
description: 'The right text of the badge'
|
||||||
required: true
|
required: true
|
||||||
label-color:
|
labelColor:
|
||||||
description: 'The left color of the badge'
|
description: 'The left color of the badge'
|
||||||
required: false
|
required: false
|
||||||
color:
|
color:
|
||||||
description: 'The right color of the badge'
|
description: 'The right color of the badge'
|
||||||
required: false
|
required: false
|
||||||
is-error:
|
isError:
|
||||||
description: 'The color will be red and cannot be overridden'
|
description: 'The color will be red and cannot be overridden'
|
||||||
required: false
|
required: false
|
||||||
named-logo:
|
namedLogo:
|
||||||
description: 'A logo name from simpleicons.org'
|
description: 'A logo name from simpleicons.org'
|
||||||
required: false
|
required: false
|
||||||
logo-svg:
|
logoSvg:
|
||||||
description: 'An svg-string to be used as logo'
|
description: 'An svg-string to be used as logo'
|
||||||
required: false
|
required: false
|
||||||
logo-color:
|
logoColor:
|
||||||
description: 'The color for the logo'
|
description: 'The color for the logo'
|
||||||
required: false
|
required: false
|
||||||
logo-width:
|
logoWidth:
|
||||||
description: 'The space allocated for the logo'
|
description: 'The space allocated for the logo'
|
||||||
required: false
|
required: false
|
||||||
logo-position:
|
logoPosition:
|
||||||
description: 'The position of the logo'
|
description: 'The position of the logo'
|
||||||
required: false
|
required: false
|
||||||
style:
|
style:
|
||||||
description: 'The style like "flat" or "social"'
|
description: 'The style like "flat" or "social"'
|
||||||
required: false
|
required: false
|
||||||
cache-seconds:
|
cacheSeconds:
|
||||||
description: 'The cache lifetime in seconds (must be greater than 300)'
|
description: 'The cache lifetime in seconds (must be greater than 300)'
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
|
|||||||
20
index.js
20
index.js
@@ -8,16 +8,16 @@ try {
|
|||||||
message: core.getInput('message')
|
message: core.getInput('message')
|
||||||
};
|
};
|
||||||
|
|
||||||
const labelColor = core.getInput('label-color');
|
const labelColor = core.getInput('labelColor');
|
||||||
const color = core.getInput('color');
|
const color = core.getInput('color');
|
||||||
const isError = core.getInput('is-error');
|
const isError = core.getInput('isError');
|
||||||
const namedLogo = core.getInput('named-logo');
|
const namedLogo = core.getInput('namedLogo');
|
||||||
const logoSvg = core.getInput('logo-svg');
|
const logoSvg = core.getInput('logoSvg');
|
||||||
const logoColor = core.getInput('logo-color');
|
const logoColor = core.getInput('logoColor');
|
||||||
const logoWidth = core.getInput('logo-width');
|
const logoWidth = core.getInput('logoWidth');
|
||||||
const logoPosition = core.getInput('logo-position');
|
const logoPosition = core.getInput('logoPosition');
|
||||||
const style = core.getInput('style');
|
const style = core.getInput('style');
|
||||||
const cacheSeconds = core.getInput('cache-seconds');
|
const cacheSeconds = core.getInput('cacheSeconds');
|
||||||
|
|
||||||
|
|
||||||
if (labelColor != '') {
|
if (labelColor != '') {
|
||||||
@@ -61,7 +61,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let data = {files: {}};
|
let data = {files: {}};
|
||||||
data.files[core.getInput('badge-name')] = {
|
data.files[core.getInput('filename')] = {
|
||||||
content: JSON.stringify(description)
|
content: JSON.stringify(description)
|
||||||
};
|
};
|
||||||
data = JSON.stringify(data);
|
data = JSON.stringify(data);
|
||||||
@@ -69,7 +69,7 @@ try {
|
|||||||
const req = http.request(
|
const req = http.request(
|
||||||
{
|
{
|
||||||
host: 'api.github.com',
|
host: 'api.github.com',
|
||||||
path: '/gists/' + core.getInput('gist-id'),
|
path: '/gists/' + core.getInput('gistID'),
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
Reference in New Issue
Block a user