You've already forked dynamic-badges-action
✨ Apply clang format
This commit is contained in:
3
.clang-format
Normal file
3
.clang-format
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
BasedOnStyle: Google
|
||||||
|
AlignConsecutiveAssignments: true
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||||
29
index.js
29
index.js
@@ -8,18 +8,17 @@ try {
|
|||||||
message: core.getInput('message')
|
message: core.getInput('message')
|
||||||
};
|
};
|
||||||
|
|
||||||
const labelColor = core.getInput('labelColor');
|
const labelColor = core.getInput('labelColor');
|
||||||
const color = core.getInput('color');
|
const color = core.getInput('color');
|
||||||
const isError = core.getInput('isError');
|
const isError = core.getInput('isError');
|
||||||
const namedLogo = core.getInput('namedLogo');
|
const namedLogo = core.getInput('namedLogo');
|
||||||
const logoSvg = core.getInput('logoSvg');
|
const logoSvg = core.getInput('logoSvg');
|
||||||
const logoColor = core.getInput('logoColor');
|
const logoColor = core.getInput('logoColor');
|
||||||
const logoWidth = core.getInput('logoWidth');
|
const logoWidth = core.getInput('logoWidth');
|
||||||
const logoPosition = core.getInput('logoPosition');
|
const logoPosition = core.getInput('logoPosition');
|
||||||
const style = core.getInput('style');
|
const style = core.getInput('style');
|
||||||
const cacheSeconds = core.getInput('cacheSeconds');
|
const cacheSeconds = core.getInput('cacheSeconds');
|
||||||
|
|
||||||
|
|
||||||
if (labelColor != '') {
|
if (labelColor != '') {
|
||||||
description.labelColor = labelColor;
|
description.labelColor = labelColor;
|
||||||
}
|
}
|
||||||
@@ -60,7 +59,7 @@ try {
|
|||||||
description.cacheSeconds = parseInt(cacheSeconds);
|
description.cacheSeconds = parseInt(cacheSeconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = {files: {}};
|
let data = {files: {}};
|
||||||
data.files[core.getInput('filename')] = {
|
data.files[core.getInput('filename')] = {
|
||||||
content: JSON.stringify(description)
|
content: JSON.stringify(description)
|
||||||
};
|
};
|
||||||
@@ -80,14 +79,8 @@ try {
|
|||||||
},
|
},
|
||||||
res => {
|
res => {
|
||||||
let body = '';
|
let body = '';
|
||||||
|
res.on('data', data => body += data);
|
||||||
res.on('data', data => {
|
res.on('end', () => console.log('result:' + body));
|
||||||
body += data;
|
|
||||||
});
|
|
||||||
|
|
||||||
res.on('end', () => {
|
|
||||||
console.log('result:' + body);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
req.write(data);
|
req.write(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user