feat: added repo card hide border option (#488)

* 🚀 Prettier config

* 🚀 hide_border for Repo Card

* fix: wrong total commits (#490)

* chore: run prettier on all files

* chore: lol lets add the trailing commas

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>
This commit is contained in:
Bas950
2020-09-24 21:38:14 +05:30
committed by GitHub
co-authored by Anurag Hazra
parent 3c6c142c75
commit 8aea1e3c35
35 changed files with 152 additions and 134 deletions
+3 -3
View File
@@ -40,13 +40,13 @@ module.exports = async (req, res) => {
stats = await fetchStats(
username,
parseBoolean(count_private),
parseBoolean(include_all_commits)
parseBoolean(include_all_commits),
);
const cacheSeconds = clampValue(
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
CONSTANTS.TWO_HOURS,
CONSTANTS.ONE_DAY
CONSTANTS.ONE_DAY,
);
res.setHeader("Cache-Control", `public, max-age=${cacheSeconds}`);
@@ -65,7 +65,7 @@ module.exports = async (req, res) => {
text_color,
bg_color,
theme,
})
}),
);
} catch (err) {
return res.send(renderError(err.message, err.secondaryMessage));
+4 -2
View File
@@ -13,6 +13,7 @@ module.exports = async (req, res) => {
const {
username,
repo,
hide_border,
title_color,
icon_color,
text_color,
@@ -36,7 +37,7 @@ module.exports = async (req, res) => {
let cacheSeconds = clampValue(
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
CONSTANTS.TWO_HOURS,
CONSTANTS.ONE_DAY
CONSTANTS.ONE_DAY,
);
/*
@@ -56,13 +57,14 @@ module.exports = async (req, res) => {
return res.send(
renderRepoCard(repoData, {
hide_border,
title_color,
icon_color,
text_color,
bg_color,
theme,
show_owner: parseBoolean(show_owner),
})
}),
);
} catch (err) {
return res.send(renderError(err.message, err.secondaryMessage));
+2 -2
View File
@@ -39,7 +39,7 @@ module.exports = async (req, res) => {
const cacheSeconds = clampValue(
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
CONSTANTS.TWO_HOURS,
CONSTANTS.ONE_DAY
CONSTANTS.ONE_DAY,
);
res.setHeader("Cache-Control", `public, max-age=${cacheSeconds}`);
@@ -55,7 +55,7 @@ module.exports = async (req, res) => {
bg_color,
theme,
layout,
})
}),
);
} catch (err) {
return res.send(renderError(err.message, err.secondaryMessage));
+2 -2
View File
@@ -31,7 +31,7 @@ module.exports = async (req, res) => {
let cacheSeconds = clampValue(
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
CONSTANTS.TWO_HOURS,
CONSTANTS.ONE_DAY
CONSTANTS.ONE_DAY,
);
if (!cache_seconds) {
@@ -51,7 +51,7 @@ module.exports = async (req, res) => {
bg_color,
theme,
hide_progress,
})
}),
);
} catch (err) {
return res.send(renderError(err.message, err.secondaryMessage));