Commit Graph

36 Commits

Author SHA1 Message Date
anuraghazra 53e40413e7 chore: update 2024-10-11 23:10:49 +05:30
Alexandr Garbuzov 5b72dfbc32 tests(stats card): cover with test changes in #3298 (#3443) 2023-10-30 11:34:42 +01:00
Alexandr Garbuzov 89fc14609e refactor: improve blacklisted username error by adding secondary message (#3444) 2023-10-30 11:31:41 +01:00
Alexandr Garbuzov 0fd1ea3ce9 feature: do not aks user's to open issues on upstream API errors (#3273)
Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-10-13 11:16:14 +02:00
Alexandr Garbuzov 65c3300189 refactor(stats card fetcher): improve could not fetch total commits error message (#3255) 2023-09-21 20:30:24 +02: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 a5ddf2632b Tests: Add index endpoint wrong locale test (#3131) 2023-08-23 14:26:04 +02:00
Alexandr Garbuzov 988044a199 Tests: Add index endpoint blacklist test (#3130) 2023-08-23 09:58:21 +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 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 a775176766 Remove restrictedContributionsCount from GraphQL query and tests (#2799) 2023-06-10 10:40:41 +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
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
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 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
Pranav Joglekar 9aa39dfe81 feat: allow users to pass ring_color param (#2075)
* fix: prevent crash if undefined color is passed to func fallbackColor

* feat: allow users to pass ring_color param

Before this commit, the ring color was always equal to the title color.
This commit allows the user to pass a ring_color property to allow him
to style the ring color the way he pleases to. If no ring_color is
passed we default to the title color.

* docs: improves ring color documentation

* fix: improve code style

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-11-19 20:18:42 +01:00
Rick Staa 98f9045f98 fix: improve error caching behavoir (#2211)
This commit ensures that the GraphQL Pat error is not cached in any
browser. See
https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1282630614.
2022-10-18 18:07:38 +02:00
rickstaa f0f92c2635 test: add cache on error test 2022-10-10 12:48:26 +02:00
Matteo Pierro af97e5765b fix: fetch all repos for for the stats card (#2100)
* fetch all stars

* stop fetching when there are repos with zero stars

* remove not needed parameters from the query

* add docstring

* removed not needed mock

* style: update formatting

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-10-04 13:10:50 +02:00
rickstaa 8886b93a7e refactor: clean up imports 2022-09-24 14:10:06 +02:00
rickstaa 41d6760abd fix: fix es6 import file extension 2022-09-24 13:20:52 +02:00
rsk2 107f7ca52c Feature/grs 1955 change commonjs imports (#1995)
* GRS-1955: Using ES6 import/export in src files

* GRS-1955: Using ES6 import/export in test files

* GRS-1955: Using ES6 import/export in themes index.js

* GRS-1955: Readding blank line at end of top-languages-card.js

* feat: fix test es6 import errors

This commit makes sure jest is set-up to support es6. It also fixes
several test errors and sorts the imports.

* test: update test node version

This commit makes sure node 16 is used in the github actions.

* refactor: run prettier

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-09-24 10:20:54 +02:00
Anurag Hazra 9d2bfd9d8f fix: temporarily increase the cache hours (#1771) 2022-05-19 00:48:26 +05:30
Anurag Hazra d049f0688d fix: hotfix for graphql api error (#1409) 2021-10-23 13:50:33 +05:30
Bas950 8aea1e3c35 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>
2020-09-24 21:38:14 +05:30
Anurag Hazra ec246d27ab fix: increase cache 2020-08-13 19:26:42 +05:30
Anurag Hazra 67b434dc79 chore(*): reorganized all files and folders (#283) 2020-08-02 13:07:26 +05:30
anuraghazra 6d5a828542 chore: added secondary warning message in renderError 2020-07-25 13:29:32 +05:30
Fábio Rosado 4c0518616f feat: Add count_private flag to count private contributions (#148)
* Add private contributions count

* Remove unused var and add tests

* Update readme

* fix: tests & minor code formating

* docs: updated docs

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
2020-07-24 19:34:38 +05:30
Anurag Hazra aa44bd7615 fix: hide parameter array implementation (#162)
* fix: hide paramter array implementation

* chore: parseArray str check

* docs: updated readme

* chore: add codecov threshold

* docs: update docs
2020-07-23 21:01:23 +05:30
anuraghazra fdf445d734 feat: added ability to set custom cache 2020-07-20 21:43:51 +05:30
anuraghazra db49ca7b71 feat: added rankings 2020-07-13 19:41:47 +05:30
anuraghazra 40e0937100 tests: added integration tests for the api endpoints 2020-07-12 20:08:01 +05:30