Commit Graph

122 Commits

Author SHA1 Message Date
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
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
Fabian Joswig 26cde6bfe9 Missing term in calculation of TOTAL_VALUES. (#2116)
* fix: added missing term in calculation of TOTAL_VALUES.

* fix: fix rank test

* refactor: update code formatting

* refactor: update code formatting

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-11-18 15:19:04 +01:00
Ray Chan c0d7493c3f Fix truncation of compact wakatime progress bar when langs_count is set (#2228)
* refactor: use default value for languages

* fix: truncated compact progress bar

* test: add test for truncated compact progress bar with langs_count set
2022-10-28 20:47:09 +02: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
Rick Staa 6fdf73f39c test: increase e2e test timeout 2022-10-11 18:10:44 +02:00
rickstaa f0f92c2635 test: add cache on error test 2022-10-10 12:48:26 +02:00
rickstaa fcd0588786 test: cleanup tests 2022-10-09 15:18:11 +02:00
rickstaa 60012707c7 test: increase stats card e2e timeout 2022-10-08 15:04:49 +02:00
Rick Staa bd9865d5a2 test: burst cache in e2e tests (#2154) 2022-10-07 20:01:01 +02:00
rickstaa 15620a11db test: fix tests 2022-10-07 12:42:04 +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 3a07cb02db ci: fix e2e test 2022-10-02 12:27:34 +02:00
rickstaa 51e7887b95 ci: fix e2e test 2022-10-02 10:52:33 +02:00
rickstaa aaf710c024 ci: fix e2e test 2022-10-02 10:35:11 +02:00
Rick Staa f8e32f9e0c ci: add e2e vercel test action (#2054)
* ci: add e2e vercel test action

This commit adds several end-to-end tests that can be used
to test whether the Vercel Preview deployment successfully
returns the cards.

* test: add additional e2e card tests

* test: improve e2e card tests

This commit makes sure that the tests also check whether a valid cards
are returned from the preview deployment.
2022-10-01 13:59:02 +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
Rick Staa f9b9015ec2 feat(stats): add 'not_bold' option to stats card (#1468) 2022-09-17 13:32:40 +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
Artem Kostiuk b0bb994ad3 Fix #1170: Allow customizable width for GitHub Stats Card (#1334)
* Change default stats card width with hide rank

* Add tests for stats card with card_width

* Add card_width Stats Card description to readme

* fix: add icon width to stats-card min width calculation

* fix: fixes rank circle padding problem

This commit fixes a padding problem that was introduced in
f9c0e0bff64f325235ccbf936c9d5f7a918ac790. In the new code, the padding
around the rank circle will be 50 when the stats card is bigger than
450. When it is smaller than 450 the left and right padding will shrink
equally.

* style: run prettier

* tests: add extra stats 'card_width' tests

This commit makes sure we also test the stats card width for the case that the 'show_icons'
option is enabled.

* style: run prettier

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-09-16 12:50:30 +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
Qi Mo Lin dd5a41d696 feat: add min width languages card (#1953)
* Add min width to languages card

* Add test for min width languages card

* feat: increase lang card min width

Co-authored-by: Rick Staa <rick.staa@outlook.com>
2022-08-18 10:32:03 +02:00
Qi Mo Lin 8d5f2da3f3 test: fix gradient test by using more specific querySelector (#1954) 2022-08-17 23:22:52 +02:00
Anurag Hazra 4e2f631f95 feat: added accessibility label and title in svg (#1787) 2022-05-26 21:59:51 +05:30
Anurag Hazra 9d2bfd9d8f fix: temporarily increase the cache hours (#1771) 2022-05-19 00:48:26 +05:30
Anurag Hazra 8d1e7f6ab5 feat: improve default card black color, a more modern color (#1624) 2022-03-01 01:19:34 +05:30
Anurag Hazra e00fe88ed3 feat: added better error messages (#1608) 2022-02-23 20:52:18 +05:30
Anurag 3199b9f088 test: happy new year 2022-02-11 00:58:28 +05:30
Rick Staa 397e321c2a test: adds language card 'exclude_repo' test (#1452) 2021-12-13 20:27:27 +05:30
T. de Kimpe b6c184e8ff fix: firefox text overflow issue (#1492)
* Fixed Firefox text overflow / overwriting issue

Tests currently don't work becouse it appears that '@supports' is not supported by cssToObject used within the tests. I currently have no idea how to fix that test but the cards themself appear to not be broken

Fixes anuraghazra/github-readme-stats#664

Fixes anuraghazra/github-readme-stats#1134

* Fixed tests by moving to other css-to-object

Moved the `css-to-object` package to @uppercod's version for test fix. This doesn't seem to have the same issues as the older package

* chore: cleanup test

Co-authored-by: Anurag <hazru.anurag@gmail.com>
2021-12-13 20:12:03 +05:30
Markus Tyrkkö 28fa0b8877 fix: bug where wakatime api returns undefined languages (#1403)
Co-authored-by: Markus Tyrkkö <markus.tyrkko@nitor.com>
2021-11-05 19:49:51 +05:30
Anurag Hazra d049f0688d fix: hotfix for graphql api error (#1409) 2021-10-23 13:50:33 +05:30