Commit Graph

258 Commits

Author SHA1 Message Date
François Rozet 66e5492654 Add finer ranking levels (#2762)
* Add finer ranking levels

* Update rank description
2023-06-12 14:38:07 +02:00
Alexandr Garbuzov a775176766 Remove restrictedContributionsCount from GraphQL query and tests (#2799) 2023-06-10 10:40:41 +02:00
Alexandr Garbuzov 3416ae114f Fix clampValue function docstring (#2796) 2023-06-09 07:41:58 +02: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 606775c33c Fix no languages data node function docstring (#2782)
* Fix docstring for noLanguagesDataNode function

* dev
2023-06-07 09:21:19 +02:00
Alexandr Garbuzov dfe0766cbb Fix docstring for noCodingActivityNode function (#2781) 2023-06-07 09:20:59 +02:00
Alexandr Garbuzov 4044a0b666 Use compact layout default langs count when hide_progress param was set (#2780) 2023-06-07 09:20:03 +02:00
Rick Staa f2841e09e1 fix: fix stats contributed to translations (#2708)
* fix: fix stats contributed to translations

* Improved russian and ukrainian translation of statcard.contribs (#2715)

---------

Co-authored-by: Alexandr Garbuzov <53787217+qwerty541@users.noreply.github.com>
2023-06-07 10:19:40 +03:00
Alexandr Garbuzov 894f2e2c5a Different default languages count for different languages card layouts (#2774)
* Different default languages count for different layouts

* docs: update default  documentation

Updates the README so that the new `langs_count` default behavoir is
explained to users.

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-06-06 16:42:46 +02:00
Alexandr Garbuzov 98b047751e Fixed layout toLowerCase bug (#2770) 2023-06-05 12:10:22 +02:00
Rick Staa 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
github-actions[bot] e0b3d833b0 refactor: update languages JSON (#2760)
Co-authored-by: rickstaa <rickstaa@users.noreply.github.com>
2023-05-31 13:24:11 +02:00
Alexandr Garbuzov 275c1fc1c7 Show notice about no languages data instead of empty card (#2755)
* Show message about no languages data instead of empty card

* dev

* dev

* dev

* dev

* dev

* dev
2023-05-29 08:45:19 +02:00
Alexandr Garbuzov 73b0a91b7b Improve ukrainian translation of langcard.title (#2756) 2023-05-29 08:43:37 +02:00
François Rozet c96e84a9ae Ranking System v2 (#1186)
* Revise rank calculation

* Replace contributions by commits

* Lower average stats and S+ threshold

* Fix calculateRank.test.js

Missing key in dictionary constructor

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

* refactor: run prettier

* feat: change star weight to 0.75

* Separate PRs and issues

* Tweak weights

* Add count_private back

* fix: enable 'count_private' again

* test: fix tests

* refactor: improve code formatting

* Higher targets

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-05-26 15:39:35 +02:00
Alexandr Garbuzov f9427b2a54 Top languages card donut vertical layout (#2701)
* Top languages card donut layout

* dev

* dev

* dev

* dev
2023-05-19 10:45:29 +02:00
Alexandr Garbuzov ff9839b73c Top languages card pie layout (#2709)
* Top languages card donut layout

* Top languages card pie layout

* renames

* dev

* docs

* dev

* dev

* animations

* dev

* handle one language
2023-05-11 08:49:57 +02:00
Alexandr Garbuzov 1f4a2c4d82 Add missing argument to create compact lang node function to resolve vscode type error (#2714) 2023-05-11 08:36:21 +02:00
Alexandr Garbuzov 4b19453c1a Fixed docstring for create donut language node function (#2713) 2023-05-10 22:59:00 +02:00
Nabil Alamin c5e7f7b490 add pie chart layout to language card (#2099)
* add pie chart layout to language card

* resolve failing top-lang card tests

* scale down pie chart

* update readme.md

* Update readme.md

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

* style: format code

* update donut layout to be created without dependencies

* minor update

* style: format readme

* resolve failing tests

* refactor: clean up code and add extra tests

This commit cleans up the pie chart generation code and adds additional
tests.

* feat: improve pie chart positioning

* rename layout pie to donut

* add animation to donut layout

* refactor: rename pie and doughnut to donut

* feat: decrease donus animation delay

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-05-09 20:54:34 +02:00
Alexandr Garbuzov daa1977ba3 Fixed docstring for wakatime card recalculate percentages function (#2710) 2023-05-09 09:04:02 +02:00
Alexandr Garbuzov 8ff5a3ba45 Fixed docstring for create language text node function (#2704) 2023-05-08 09:33:08 +02:00
Alexandr Garbuzov 15436e2aa1 Fixed axios imports inside docstrings to resolve vscode type errors (#2699) 2023-05-07 22:03:26 +02:00
Alexandr Garbuzov 6f449a1f0b Fixed docstring for get styles function to resolve vscode type errors (#2700) 2023-05-07 22:03:00 +02:00
Fabiano Couto a340900e8a fix(wakatime-fetcher): add default range to prevent user not found error (#2670)
* 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>

* add wakatime default range

* update wakatime demos in readme with most active user

* update wakatime demo in readme

* remove &range=all_time from wakatime demos in readme

---------

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2023-05-05 23:12:28 +02:00
Alexandr Garbuzov c6dab8b0f2 Fixed docstring for stats card create text node function to resolve type errors (#2689) 2023-05-05 14:07:15 +00:00
Alexandr Garbuzov 311204f4f9 Fixed docstring for several wakatime card gen functions to resolve multiple type errors (#2690) 2023-05-05 14:06:52 +00:00
Alexandr Garbuzov 0dc3531666 Fixed wakatime create text node func docstring to resolve vscode type errors (#2678) 2023-05-04 09:13:47 +02:00
Alexandr Garbuzov a4d6fe104f Fixed card constructor docstring to resolve vscode type errors (#2674) 2023-05-03 07:04:33 +02:00
Alexandr Garbuzov cb99414d3d Show no activity error in compact layout of wakatime card (#2662) 2023-05-01 08:21:29 +02:00
Alexandr Garbuzov 2f4279e738 Fixed vscode type error in get card colors function (#2660) 2023-04-30 08:20:26 +02:00
Alexandr Garbuzov 31d1ab43d0 Fixed todo inside stats card data fetcher (#2649) 2023-04-28 17:48:34 +02:00
Alexandr Garbuzov 6eebfe36e8 Fixed docs typo inside src/common/utils.js (#2651) 2023-04-28 09:51:24 +02:00
kitswas 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 f2516d60a442dfdbb9e24ddda8743664bcb8064d

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-04-25 08:19:05 +02:00
Alexandr Garbuzov da5f82ff02 removed redundant comparison (#957) 2023-04-25 08:15:16 +02:00
LOKESH SINGH aec73d293e Updated the custom error there was a Typo. (#2618)
"Something went while trying to retrieve the stats data using the GraphQL API." -> "Something went wrong while trying to retrieve the stats data using the GraphQL API."
2023-04-24 20:24:05 +02:00
Fabiano Couto 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-Harris 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
github-actions[bot] b928f51442 refactor: update languages JSON (#2596)
Co-authored-by: rickstaa <rickstaa@users.noreply.github.com>
2023-03-31 06:40:22 +05:30
github-actions[bot] d60d53cdb4 refactor: update languages JSON (#2554)
Co-authored-by: rickstaa <rickstaa@users.noreply.github.com>
2023-03-01 06:47:56 +05:30
Rehman 2ab8b85ae3 fix: for issue #2534 (#2536) 2023-02-25 14:31:49 +01:00
Rick Staa a3c6f874af test: update snapshots (#2519) 2023-02-25 13:32:08 +01:00
Amir 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
Rick Staa 112000667c ci: add update languages action (#2484)
* ci: add update languages action

* ci: make sure PR is created when upstream languages are updated
2023-01-29 15:19:01 +01:00
Rick Staa 077d40561a feat: add PAT monitoring functions (#2178)
* feat: add PAT monitoring functions

This commit adds two monitoring functions that can be used to check
whether the PATs are functioning correctly:
 - status/up: Returns whether the PATs are rate limited.
 - status/pat-info: Returns information about the PATs.

* feat: add shields.io dynamic badge json response

This commit adds the ability to set the return format of the
`/api/status/up` cloud function. When this format is set to `shields` a
dynamic shields.io badge json is returned.

* feat: add 'json' type to up monitor

* feat: cleanup status functions

* ci: decrease pat-info rate limiting time

* feat: decrease monitoring functions rate limits

* refactor: pat code

* feat: add PAT monitoring functions

This commit adds two monitoring functions that can be used to check
whether the PATs are functioning correctly:
 - status/up: Returns whether the PATs are rate limited.
 - status/pat-info: Returns information about the PATs.

* feat: add shields.io dynamic badge json response

This commit adds the ability to set the return format of the
`/api/status/up` cloud function. When this format is set to `shields` a
dynamic shields.io badge json is returned.

* feat: add 'json' type to up monitor

* feat: cleanup status functions

* ci: decrease pat-info rate limiting time

* feat: decrease monitoring functions rate limits

* refactor: pat code

* test: fix pat-info tests

* Update api/status/pat-info.js

Co-authored-by: Anurag Hazra <hazru.anurag@gmail.com>

* test: fix broken tests

* chore: fix suspended account

* chore: simplify and refactor

* chore: fix test

* chore: add resetIn field

---------

Co-authored-by: Anurag <hazru.anurag@gmail.com>
2023-01-28 19:52:02 +05:30
Rick Staa cd5cbcdb09 fix: fixes card overflow problem #2452 (#2460)
This commit makes sure that the card width is formatted correctly.
2023-01-24 20:10:11 +05:30
Rick Staa 60fae292a3 feat: enable multi page star fetching for private vercel instances (#2159)
* feat: enable multi-page stars' fetching for private vercel instances

This commit enables multi-page stars' support from fetching on private Vercel
instances. This feature can be disabled on the public Vercel instance by adding
the `FETCH_SINGLE_PAGE_STARS=true` as an env variable in the public Vercel
instance. This variable will not be present when people deploy their own Vercel
instance, causing the code to fetch multiple star pages.

* fix: improve stats multi-page fetching behavoir

This commit makes sure that the GraphQL api is only called one time per
100 repositories. The old method added one unnecesairy GraphQL call.

* docs: update documentation

* style: improve code syntax

Co-authored-by: Matteo Pierro <pierromatteo@gmail.com>

* lol happy new year

* docs: remove rate limit documentation for now

Remove the `FETCH_SINGLE_PAGE_STARS` from documentation for now since it
might confuse people.

* fix: fix error in automatic merge

* feat: make sure  env variable is read

Co-authored-by: Matteo Pierro <pierromatteo@gmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2023-01-21 18:32:37 +01:00
Rick Staa 06a2a78cfc Revert "Revert "Add loading Animation to Most used Language card (#2197)" (#2396)" (#2419)
This reverts commit 4b8198fa21.
2023-01-16 12:30:39 +01:00
Rick Staa ad9db67b4c refactor: update code formatting 2023-01-16 12:28:31 +01:00
Anurag Hazra 0ff426d258 fix: retryer fixed (#2400) 2023-01-13 13:16:33 +05:30