Commit Graph
133 Commits
Author SHA1 Message Date
Alexandr GarbuzovandAlexandr c43fd65bdd refactor: move svg rendering related code into separate module (#4588)
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-16 23:44:17 +03:00
Alexandr GarbuzovandAlexandr e158f0d27f refactor: move operations into separate module (#4582)
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-15 23:29:53 +03:00
6d1a5e51bc refactor: move logger into separate module (#4581)
* refactor: move logger into separate module

* Update api/status/pat-info.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-15 23:03:48 +03:00
Alexandr GarbuzovandAlexandr bf021b0670 fix: resolve several vscode type errors inside fetchers code (#4579)
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-15 21:51:32 +03:00
Alexandr GarbuzovandAlexandr 2df35521d7 refactor: move HTTP related code into separate module (#4578)
* refactor: move HTTP related code into separate module

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-15 20:09:34 +03:00
4143c6dec3 feat: implement number precision parameter for stats card (#4514)
* Update short number format 

Update short number format by adding 2 decimal places instead of 1 for numbers between 1,000 and 9,999

* review

* Update src/common/utils.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* dev

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-13 20:21:28 +03:00
Ophelia GoldsteinandAlexandr 90955dca00 fix: remove repository link display on missing param errors (#4560)
* fix: remove repository link display on missing param errors

* fix tests

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-12 23:14:27 +03:00
Ophelia GoldsteinandAlexandr 0849165c6e fix: resolve vscode type errors in API endpoints files (#4555)
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-11 20:57:00 +03:00
0afa6c4e78 refactor: reorganize cache TTL constants (#4550)
* refactor: reorganize cache TTL constants

* Update tests/wakatime.test.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-09 03:41:02 +03:00
Ophelia GoldsteinandAlexandr 66764616fa fix: ensure top langs error card dont ignore customization options (#4538)
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-07 23:32:56 +03:00
e9d0e8fd17 refactor: named arguments for render error function (#4537)
* refactor: named arguments for render error function

* Update tests/api.test.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-07 23:21:18 +03:00
195e2fc72d refactor: move access guards logic into reusable functions (#4535)
* refactor: move access guards logic into reusable functions

* Update src/common/access.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-07 21:13:13 +03:00
Alexandr GarbuzovandAlexandr 09627ce715 refactor: move cache headers logic into reusable functions (#4533)
* refactor: move cache headers logic into reusable functions

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-07 00:13:21 +03:00
Alexandr GarbuzovandAlexandr ade7d53653 refactor: move cache seconds calculation logic into reusable function (#4532)
* refactor: move cache seconds calculation logic into reusable function

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-06 23:32:47 +03:00
Alexandr GarbuzovandAlexandr f5b1ffa5e3 refactor: move all envs related code into separate file (#4529)
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-06 21:32:23 +03:00
martin-mfgandAlexandr 39b93b57c8 feat: wakatime card width customization (#4458)
* add card_width to wakatime card

* better handling of card_width in wakatime card

* move default card_width for wakatime card, add to readme

* review

* review

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-10-05 23:03:25 +03:00
b594b57b56 feat: implement commits year option and display appropriate year label (#2107)
* add custom year

* edit fetcher

* add tests

* add documentation

* Update vercel.json

* Update fetchStats.test.js

* Update readme.md

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* test: fix tests

* style: format code

* fix: fix commit stats time frame description #1053

This commit makes sure the last year label is shown when
`include_all_commits` or `year` is not provided. See #1053 for more
information.

* resolved merge conflict

* Update stats-fetcher.js

* resolve comments

* Update src/cards/types.d.ts

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* Update src/fetchers/stats-fetcher.js

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* graphQL year only to commit

* change argument name to commits_year

* Update readme.md

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* Update readme.md

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* Update readme.md

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* wrap label into function

* review

* more review

* fix test

* Update readme.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs

---------

Co-authored-by: Touch Sungkawichai <talay@10ninox.com>
Co-authored-by: Rick Staa <rick.staa@outlook.com>
Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-17 22:01:37 +03:00
078040d26e feat: add bytes stats format option for top-languages card (#3708)
* feat: add `display_bytes` option to top-languages.

* docs: add description about display bytes in top-languages

* feat: add `stats_format` option instead of `display_bytes`

* docs: add description about stats format in top-languages

* refactor: rewrite with function to determine display value

* docs: add `stats_format`to table of parameter

* fix: remove unnecessary decimal part from format of bytes

* tests: add tests of stats_format in top-langs card

* Update tests/renderTopLanguagesCard.test.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update readme.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* prettier

* jsdoc

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-16 21:41:46 +03:00
Kyle UptonandAlexandr 3987991058 feat: implement whitelist for self-hosted instances (#3939)
* whitelist for username based endpoints

* added gist whitelist

* review

* fix

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2025-09-15 23:13:42 +03:00
Alexandr Garbuzov 68084d9f67 fix: return cache seconds value clamping which was accidentally removed in cdc6ad1 (#4379) 2025-09-07 20:43:59 +03:00
Alexandr Garbuzov dd7582db8f refactor: fix cards files names by removing duplicating postfix (#4376) 2025-08-24 17:14:18 +03:00
Alexandr Garbuzov 09cb2a596e refactor: fix fetchers names by removing duplicating postfix (#4375) 2025-08-24 17:07:23 +03:00
anuraghazra bebcb26431 chore: format 2024-10-11 23:19:31 +05:30
anuraghazra 53e40413e7 chore: update 2024-10-11 23:10:49 +05:30
anuraghazra cdc6ad1eaf feat: cost optimize, increase cache 2024-10-11 23:07:05 +05:30
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Alexandr
e559268be4 build(deps-dev): bump eslint from 8.57.0 to 9.8.0 (#3878)
* build(deps-dev): bump eslint from 8.57.0 to 9.8.0

Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.8.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* migrate on latest eslint config

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2024-08-12 20:19:17 +03:00
b8983dd697 feat: show wakatime stats in percentage (resolves #3016) (#3326)
* added option to display wakatime in percentage

* updated exclusive options in wakatime

* added percent sign

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* made the required changes

* Update wakatime-card.js

* Update wakatime-card.js

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2023-11-23 21:13:48 +02:00
Alexandr Garbuzov a8663a8025 feat(wakatime card): add disable animations query option (#3496)
* feat(wakatime card): add disable animations query option

* docs
2023-11-23 21:06:01 +02:00
Alexandr Garbuzov ddcc30d641 feat(repo card): add description lines count query parameter (#3453)
* feature(repo card): add description lines count query parameter

* dev

* dev

* docs

* test
2023-11-20 20:08:48 +02:00
Alexandr Garbuzov 89fc14609e refactor: improve blacklisted username error by adding secondary message (#3444) 2023-10-30 11:31:41 +01:00
Pritam SharmaandAlexandr Garbuzov 9c6eb22862 feature: render error card in same theme as requested card (resolves #3259) (#3298)
* Error theme Based on Design

* Update src/common/utils.js

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

* Update src/common/utils.js

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>

---------

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>
2023-10-28 22:31:24 +03:00
Alexandr Garbuzov 1c07f4142c feature: fetch only requested data from GitHub GraphQL API to reduce load (#3208)
* feature: fetch only requested data from GitHub GraphQL API to reduce load

* dev

* dev
2023-10-13 22:14:06 +03:00
Alexandr Garbuzov 2ee803fc16 feature: extend default card cache time to 6 hours (#3242)
* feature: extend default card cache time to 8 hours

* reduce to six hours
2023-09-19 11:54:27 +02:00
Rick Staa bc8eaecaf4 feat: rate limit error chaching (#2448)
* feat: rate limit error chaching

Rate limit error caching to alleviate PATs.

* refactor: improve code comments
2023-09-17 15:45:17 +02:00
Alexandr Garbuzov da82999f06 Feature: Gist card: Add hide_border option support (#3080) 2023-08-15 09:25:04 +02:00
Alexandr Garbuzov fe901dd337 Feature: Add gist card (#3064)
* Feature: Add gist card

* dev

* dev

* dev

* dev

* dev

* dev

* e2e

* e2e test timeout
2023-08-14 11:28:01 +02:00
Alexandr Garbuzov ed84840b97 Refactor: Status PAT info endpoint: Resolve jsdoc eslint errors (#3045) 2023-08-06 23:09:21 +02:00
Alexandr Garbuzov 8780cc24ae Refactor: Status up endpoint: Resolve jsdoc eslint errors (#3046) 2023-08-06 23:08:47 +02:00
Alexandr Garbuzovandrickstaa b70b089b8e Stats card: migrate from show_total_reviews to show option (resolves #2836) (#2844)
* Stats card: migrate from show_total_reviews to show option (resolves #2836)

* dev

* docs: improve documentation

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-06-17 23:10:13 +03:00
1bb65ddc29 Added pr reviews to stats (#1404)
* Added pr reviews to stats

* Add 'show' query parameter

* Fix show test

* refactoring

* cleanup

* refactor: restructure stats-card code

---------

Co-authored-by: Markus <markus.tyrkko@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-06-15 09:35:09 +02:00
Rick Staa 3e66189c44 feat: add CACHE_SECONDS environment variable (#2266)
* feat: add CACHE_SECONDS environment variable

This commit adds the CACHE_SECONDS environment variable. This variable
can be used to circumvent our cache clamping values for self hosted
Vercel instances.

* refactor: apply formatter
2023-06-09 04:44:42 +03:00
Rick Staa b9200c6cf6 feat: remove 'include_private' (#2736)
* feat: remove 'include_private'

As explained in #2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.

* fix: fix tests

* docs: remove redundant private deploy note
2023-06-07 11:21:28 +03:00
Alexandr Garbuzov 98b047751e Fixed layout toLowerCase bug (#2770) 2023-06-05 12:10:22 +02:00
Rick StaaandHakula Chen c301289f7d fix: Make WakaTime card compatible with new API (#2707)
* fix: Make WakaTime card compatible with new API

This commit makes sure that the WakaTime card works with the new
WakaTime API. See https://github.com/anuraghazra/github-readme-stats/issues/2698
for more information.

* fix: fix chinese simplified translations

* fix: improve WakaTime range order

* test: fix WakaTime tests

* refactor: remove WakaTime range loop

* refactor: remove redundant WakaTime call

* test: fix e2e tests

Co-authored-by: Hakula Chen <i@hakula.xyz>

---------

Co-authored-by: Hakula Chen <i@hakula.xyz>
2023-06-02 14:37:59 +05:30
kitswasandrickstaa 5577bbf07f New top language algorithm implementation (#1732)
* Reduced vercel maxDuration

* Implemented new algorithm for Top Langs

* Revert "Reduced vercel maxDuration"

This reverts commit b0bc626efe12c738cf5005e7f11c7d2a07b6387a.

* Added documentation

* Fixed broken implementation

* Update fetchTopLanguages.test.js

Changed tests

* Now uses the general formula

The parameters p and q can be set by the user.

* Updated tests and added new test

* Added new test

New test for order by repo count.

* Updated documentation

Added explanation and examples for new options.

* Updated documentation

This was overwritten in the merge commit.

* docs: improve docs and fix tests

* Renamed parameters

Renamed `p` and `q` to `size_weight` and `count_weight`, respectively.

* Updated the documentation

Changes introduced in f2516d60a4

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-04-25 08:19:05 +02:00
Fabiano CoutoandRick Staa 879937c11d feat(RankIcon): add rank_icon option (#2628)
* feat(theme): add github_dark_dimmed theme

* feat(theme): change github_dark_dimmed icon color

* contrast ratio adjustment

contrast ratio adjustment on github_dark_dimmed theme

* feat(theme): readme preview

* feat(theme): github themes next to each other

* github themes next to each other

* feat(RankIcon): add rank icon option

* feat(RankIcon): extract rankIcon to icons file

* feat(RankIcon): update readme

* feat(RankIcon): test coverage

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-04-24 13:56:14 +00:00
Caeden Perelli-HarrisandRick Staa d8244a7fe5 Add format stats option (#2155)
* feat: added `format_stats` option (#2128)

* refactor: change `format_stats` to `short_values` (#2128)

* test: create shorten values test (#2128)

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: rename ``short_values`` to ``number_format``

* Update readme.md

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* Update src/cards/stats-card.js

Co-authored-by: Rick Staa <rick.staa@outlook.com>

* refactor: format codebase

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-04-01 10:17:56 +05:30
Rick Staa 9ec2c8367a refactor: fix code comments and change 'up' rate limit (#2560) 2023-03-02 07:44:43 +05:30
AmirandZohan Subhash ba7c2f8b55 Support hide_progress for top-langs feature (#2514)
* Add support for hide_progress in top languages feature

* Fix mistake

* Add documents for all languages

* Remove unnecessary value check

* Update top-languages-card.js

* Revert document for all languages except English

* Update documentation

* Update documentation

---------

Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
2023-02-16 06:53:11 +05:30
Anurag Hazra 7aa502d453 chore: minor changes in pat info (#2481) 2023-01-28 20:32:40 +05:30