Commit Graph

155 Commits

Author SHA1 Message Date
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
a258b29db5
Feature: Stats card: Show merged PRs count and percentage (#3003)
* Feature: Stats card: Show merged PRs count and percentage

* dev

* dev

* renames
2023-08-14 02:18:57 +03:00
Alexandr Garbuzov
b56689b4bd
Ranks: Take into account user reviewed PRs count (#2857)
* Rank: Take into account user reviewed PRs count

* e2e

* fix tests

* dev

* docs

* dev

* dev
2023-07-21 13:59:53 +02:00
Alexandr Garbuzov
6c92fe9d2a
Eslint integration (#2885)
* eslint integration

* ci & pre commit

* dev

* dev

* dev
2023-07-03 08:54:19 +02:00
Alexandr Garbuzov
9f7184cc9e
Top langs card tests: Fixed helper functions docstrings (#2893) 2023-06-28 20:25:26 +02:00
Alexandr Garbuzov
5486e2ca06
Increase e2e tests timeout secs (#2878) 2023-06-23 09:24:17 +02:00
Rick Staa
2642fc546c
add percentile rank icon (#2859)
* feat: add 'percentile' rank icon

This commit adds the `percentile` option for the `rank_icon` query
variable. This option displays the rank percentile the user belongs to.

* style: improve percentile rank icon styling

* dev

* dev

* dev

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
2023-06-20 08:47:02 +02:00
Rick Staa
a362af0ebc
feat: add 'progress' rank icon (#2858)
This pull request allows users to replace the rank level with the rank progress
by setting the `rank_icon` query to `progress`.
2023-06-19 12:58:02 +02:00
Alexandr Garbuzov
92518e375f
Stats card: show started and answered discussions stats (#2849)
* Stats card: show started and answered discussions stats

* trans

* dev
2023-06-19 05:51:58 +02:00
Alexandr Garbuzov
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
Alexandr Garbuzov
99aca1b6d5
Fixed docstring for trimTopLanguages function (#2833)
* Fixed docstring for trimTopLanguages function

* dev
2023-06-16 09:25:46 +02:00
Markus Tyrkkö
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
9831d254d7
test: update 2e2 rank values (#2816)
This commit ensures the new rank values introduced by #2762 are added
to the 2e2 test.
2023-06-13 16:58:30 +03:00
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
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
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
fa4d7ee7a1
Cover with test changes in #2770 pull request (#2775) 2023-06-06 08:56:23 +02:00
Alexandr Garbuzov
14fe4cf1db
Remove redundant async notation from several top languages card tests (#2767) 2023-06-05 12:14:33 +02:00
Alexandr Garbuzov
1e0183d202
Conver with test changes in #2755 pull request (#2766) 2023-06-05 12:11:55 +02:00
Rick Staa
1a2a82c3be
test: add new ranking to e2e test (#2750) 2023-06-02 14:44:12 +05:30
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
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
6d45f89c9e
Top languages card render test: move repeated code into helper function (#2718) 2023-05-13 13:21:06 +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
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
Rongrong
0caa4c5fd8
test: fix mistaken pageInfo.endCursor keys (#2657)
The previous mock logic was too simplistic and has been fixed in the
commit. If the mock logic had been properly implemented, then the
mistaken pageInfo.endCursor keys should have made the test case "should
fetch two pages of stars if 'FETCH_MULTI_PAGE_STARS' env variable is set
to `true`" stuck.
2023-05-06 08:07:03 +00:00
Alexandr Garbuzov
0c2fe4e07b
Cover with test changes in #2662 pull request (#2673) 2023-05-06 07:43:37 +00: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
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 f2516d60a4

---------

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-04-25 08:19:05 +02:00
Alexandr Garbuzov
be0d96615d
Fix typos inside wakatime test name (#2617) 2023-04-24 20:24:41 +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
Rick Staa
82224fa68a
ci: update e2e tests (#2548) 2023-02-25 19:42:11 +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
Anurag Hazra
7aa502d453
chore: minor changes in pat info (#2481) 2023-01-28 20:32:40 +05:30
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
rickstaa
c1dc7b850c
fix: fix e2e test data 2023-01-21 17:58:35 +01:00
rickstaa
4ff2c2a425
feat: fix e2e tests 2023-01-21 17:52:51 +01:00
rickstaa
227711c628
test: update snapshots 2023-01-10 10:08:33 +00:00
Rick Staa
ad3726ee49
fix: fix repoContrib confusion (#2269) (#2274)
This commit prevents confusion about the Contributed to stat. Currently,
only the last year's results are shown, but it looks like it is the
all-time contribution count (see #2269). This commit adds a ' (last year)'
suffix to prevent this confusion from happening.
2022-11-22 09:18:22 +01:00
Rick Staa
3cb205c65b
feat: improve card loading speed (#2124)
* feat: improve card loading times

This commit adds the `stale-while-revalidate` option to speed up the
card loading times.

* mend
2022-11-21 10:21:46 +01:00
Rick Staa
5df25a6472
fix: improve boolean parse behaviour (#2029) 2022-11-21 10:10:46 +01:00
rickstaa
b2e34ac8db
test: update snapshots 2022-11-20 08:39:44 +01:00