Commit graph

74 commits

Author SHA1 Message Date
Bohdan Karashchuk
db921818be
fix(top langs fetcher): fix typo inside error message (#3431)
* Update top-languages-fetcher.js

* Update fetchTopLanguages.test.js

---------

Co-authored-by: Alexandr Garbuzov <qwerty541zxc@gmail.com>
2023-10-28 22:26:31 +03:00
Alexandr Garbuzov
8278980d25
infra: enable no-negated-condition eslint rule (#3283)
* infra: enable no-negated-condition eslint rule

* dev

* dev
2023-10-15 21:38:32 +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
7bf4a873f1
refactor: add GitHub REST API error to CustomError class (#3272) 2023-09-22 17:43:58 +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
c1be93922d
infra: enable no-use-before-define eslint rule (#3234) 2023-09-17 15:55:27 +02:00
Alexandr Garbuzov
64f56e88b4
refactor: change confusing behavior of showing 0 commints when upstream API fails (#3238) 2023-09-17 11:14:40 +02:00
Alexandr Garbuzov
c42798b39e
refactor: enable curly eslint rule (#3137) 2023-09-12 10:06:01 +02:00
Alexandr Garbuzov
0ac5280ba6
Top langs card: Remove unreachable code from fetcher and increase tests coverage (#3126) 2023-08-22 09:00:56 +02:00
Alexandr Garbuzov
93733caaa6
Gist card: handle not found error (#3100) 2023-08-20 09:58:16 +02:00
Alexandr Garbuzov
2e619cc8a8
feat(gist): handle missing param error (#3101) 2023-08-19 08:35:52 +02:00
Alexandr Garbuzov
24ac78bdb0
Refactor: Gist card: Fix description type since it can be not set (#3089) 2023-08-17 09:43:06 +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
48830adefa
Refactor: Stats card: Set username param type for totalCommitsFetcher function inside data fetcher (#3068) 2023-08-14 10:44:54 +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
135176f073
Enable consistent return eslint rule (#3065) 2023-08-12 08:11:12 +02:00
Alexandr Garbuzov
c04dd426b1
Refactor: Top langs card: Use typedef tags inside data fetcher (#3061) 2023-08-10 08:41:35 +02:00
Alexandr Garbuzov
72cfdf832d
Refactor: Stats card: Use typedef tags inside data fetcher (#3056) 2023-08-09 09:22:44 +02:00
Alexandr Garbuzov
3b975d0fbc
Refactor: Repo card: Use typedef tags inside data fetcher to resolve eslint errors (#3043) 2023-08-05 06:09:37 +02: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
87619d618e
Refactor: remove redundant import from wakatime data fetcher (#2944) 2023-07-15 19:27:41 +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
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
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
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
15436e2aa1
Fixed axios imports inside docstrings to resolve vscode type errors (#2699) 2023-05-07 22:03:26 +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
31d1ab43d0
Fixed todo inside stats card data fetcher (#2649) 2023-04-28 17:48:34 +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
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
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
0efb982c2a
Revert "feat: add INCLUDE_ORGS env variable (#2275)" (#2276)
This reverts commit ada9cf4e0e.
2022-11-21 11:15:32 +01:00
Rick Staa
ada9cf4e0e
feat: add INCLUDE_ORGS env variable (#2275)
This commit adds an INCLUDE_ORGS ENV variable that can be used to include results from
organizations into the GRS cards for self-deployed Vercel instances.

**Warning**
This is a hidden feature since we can not officially support this on the Public
Vercel instance due to GraphQL and Vercel rate/timeout limits. You can set this env
variable via Vercel's ENV variable menu (see
https://vercel.com/docs/concepts/projects/environment-variables).
2022-11-21 11:08:05 +01:00
Rick Staa
42a4b6f60a
refactor: remove unused dotenv calls (#2059)
As explained in the Vercel documentation vercel ignores dot files (see
https://github.com/vercel/vercel/discussions/3962#discussioncomment-4277). It
instead loads the env variables defined in the vercel instance. As a
result we can therefore remove dotenv.
2022-11-21 10:13:14 +01:00
Rick Staa
4b656ebabb
refactor: migrate to using arrow functions (#2033) 2022-11-21 10:07:09 +01:00
Frieder Bluemle
199870aa9f
refactor: fix GitHub capitalization (#2232) 2022-10-26 16:41:59 +02:00
rickstaa
36a8c392d0
fix: improve graphql error handling 2022-10-07 17:40:26 +02:00
Shivam Kotak
343058cc15
fix: adding doc strings to files in src folder where it was missing (#2129)
* fix: adding doc strings to files in src folder where it was missing

* refactor: add docstrings

* style: run formatter

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-10-07 16:22:02 +02:00
rickstaa
15620a11db
test: fix tests 2022-10-07 12:42:04 +02:00
rickstaa
04595dfe62
style: improve formatting 2022-10-07 11:10:48 +02:00
rickstaa
aae83cb22e
fix: temporary disable multi page star fetch 2022-10-05 00:47:14 +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
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
Rick Staa
c1324b31bf
feat: add 'exclude_repo' option to stats card (#1450)
This commit allows users to exclude repositories for the stats card
using the `exclude_repo` option.
2022-09-16 13:09:19 +02:00
Steven
4c2307ab4b
Add prettier check to CI (#1999)
* Add prettier check to CI

* Run prettier:format
2022-09-06 09:09:45 +02:00
Adil Hanney
a481021dab
Fix NaN and undefined for empty profiles (#1965)
* totalCommits: don't return NaN

* rank: B+ should cover everyone

Empty profile used to show "undefined" as the rank. Now empty profile shows "A+"... is B+ possible?
2022-08-26 22:28:48 +02:00