From 570619752f3a3d2a974c6b5137fd63e2fc1184cc Mon Sep 17 00:00:00 2001 From: Alexandr Garbuzov <186095128+alexandr-garbuzov@users.noreply.github.com> Date: Sun, 19 Oct 2025 21:34:30 +0300 Subject: [PATCH 1/6] chore: enable tscheck inside HTTP module (#4601) Co-authored-by: Alexandr --- src/common/http.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/http.js b/src/common/http.js index 388d105289906..ef6258b0b85eb 100644 --- a/src/common/http.js +++ b/src/common/http.js @@ -1,3 +1,5 @@ +// @ts-check + import axios from "axios"; /** From 7a5ac44604c8d0b6489849e1307fbd643d5222b8 Mon Sep 17 00:00:00 2001 From: Alexandr Garbuzov <186095128+alexandr-garbuzov@users.noreply.github.com> Date: Sun, 19 Oct 2025 21:47:24 +0300 Subject: [PATCH 2/6] docs(readme): change available envs formatting to the table instead of list (#4602) * docs(readme): change available envs formatting to the table instead of list * dev * dev * dev * dev * dev * dev * dev * dev * dev * dev * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * dev --------- Co-authored-by: Alexandr Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- readme.md | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index e7faba9885405..78fe9ae42fb69 100644 --- a/readme.md +++ b/readme.md @@ -890,11 +890,42 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme GitHub Readme Stats provides several environment variables that can be used to customize the behavior of your self-hosted instance. These include: -* `CACHE_SECONDS`: Sets the cache duration in seconds for the generated cards. This variable takes precedence over the default cache timings for the public instance. You can also set it to `0` to disable caching completely. If this variable is not set, the default cache duration is 24 hours (86,400 seconds). -* `WHITELIST`: A comma-separated list of GitHub usernames that are allowed to access your instance. If this variable is not set, all usernames are allowed. -* `GIST_WHITELIST`: A comma-separated list of GitHub gist IDs that are allowed to be accessed on your instance. If this variable is not set, all gist IDs are allowed. -* `EXCLUDE_REPO`: A comma-separated list of repositories that will be excluded from stats and top languages cards on your instance. This allows repository exclusion without exposing repository names in public URLs. This enhances privacy for self-hosted instances that include private repositories in stats cards. -* `FETCH_MULTI_PAGE_STARS`: When set to `true`, this enables fetching all starred repositories for accurate star counts, especially for users with more than 100 repositories. This may increase response times and API points usage, so it is disabled on the public instance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionSupported values
CACHE_SECONDSSets the cache duration in seconds for the generated cards. This variable takes precedence over the default cache timings for the public instance. If this variable is not set, the default cache duration is 24 hours (86,400 seconds).Any positive integer or 0 to disable caching
WHITELISTA comma-separated list of GitHub usernames that are allowed to access your instance. If this variable is not set, all usernames are allowed.Comma-separated GitHub usernames
GIST_WHITELISTA comma-separated list of GitHub Gist IDs that are allowed to be accessed on your instance. If this variable is not set, all Gist IDs are allowed.Comma-separated GitHub Gist IDs
EXCLUDE_REPOA comma-separated list of repositories that will be excluded from stats and top languages cards on your instance. This allows repository exclusion without exposing repository names in public URLs. This enhances privacy for self-hosted instances that include private repositories in stats cards.Comma-separated repository names
FETCH_MULTI_PAGE_STARSEnables fetching all starred repositories for accurate star counts, especially for users with more than 100 repositories. This may increase response times and API points usage, so it is disabled on the public instance.true or false
See [the Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables) on adding these environment variables to your Vercel instance. From 0b21b2b54213b84a2909461b13dec918cf0f9720 Mon Sep 17 00:00:00 2001 From: Alexandr Garbuzov <186095128+alexandr-garbuzov@users.noreply.github.com> Date: Sun, 19 Oct 2025 21:48:18 +0300 Subject: [PATCH 3/6] chore: enable tscheck inside envs module (#4603) Co-authored-by: Alexandr --- src/common/envs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/envs.js b/src/common/envs.js index f1ae30de4b2e5..5f1319662b94d 100644 --- a/src/common/envs.js +++ b/src/common/envs.js @@ -1,3 +1,5 @@ +// @ts-check + const whitelist = process.env.WHITELIST ? process.env.WHITELIST.split(",") : undefined; From 5de1aa8706efd7f554c19cc0897ad6b869b80856 Mon Sep 17 00:00:00 2001 From: Alexandr Garbuzov <186095128+alexandr-garbuzov@users.noreply.github.com> Date: Sun, 19 Oct 2025 23:51:42 +0300 Subject: [PATCH 4/6] fix: resolve vscode type errors inside I18n class (#4605) Co-authored-by: Alexandr --- src/common/I18n.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/I18n.js b/src/common/I18n.js index bd5f29fcb6a84..75b9c91aa2766 100644 --- a/src/common/I18n.js +++ b/src/common/I18n.js @@ -1,3 +1,5 @@ +// @ts-check + const FALLBACK_LOCALE = "en"; /** @@ -9,7 +11,7 @@ class I18n { * * @param {Object} options Options. * @param {string=} options.locale Locale. - * @param {Object} options.translations Translations. + * @param {any} options.translations Translations. */ constructor({ locale, translations }) { this.locale = locale || FALLBACK_LOCALE; From 79162359c19eabb91d4e64ce6fcebc114769a503 Mon Sep 17 00:00:00 2001 From: Alexandr Garbuzov <186095128+alexandr-garbuzov@users.noreply.github.com> Date: Sun, 19 Oct 2025 23:52:12 +0300 Subject: [PATCH 5/6] chore: enable tscheck inside icons module (#4606) Co-authored-by: Alexandr --- src/common/icons.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/icons.js b/src/common/icons.js index 771704a335d12..98023b675e292 100644 --- a/src/common/icons.js +++ b/src/common/icons.js @@ -1,3 +1,5 @@ +// @ts-check + const icons = { star: ``, commits: ``, From 08d7b25d23554b45b4e7da3d1f3a801e8754984c Mon Sep 17 00:00:00 2001 From: Alexandr Garbuzov <186095128+alexandr-garbuzov@users.noreply.github.com> Date: Sun, 19 Oct 2025 23:52:42 +0300 Subject: [PATCH 6/6] fix: mark Japanese as long locale for stats card (#4607) Co-authored-by: Alexandr --- src/cards/stats.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cards/stats.js b/src/cards/stats.js index 44f787c5882a2..6b428d48c34ae 100644 --- a/src/cards/stats.js +++ b/src/cards/stats.js @@ -34,6 +34,7 @@ const LONG_LOCALES = [ "fr", "hu", "id", + "ja", "ml", "my", "nl",