Commit graph

380 commits

Author SHA1 Message Date
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
Rick Staa
4b8198fa21
Revert "Add loading Animation to Most used Language card (#2197)" (#2396)
This reverts commit 77dcdab42c.
2023-01-12 22:52:34 +01:00
Huzaifa Khilawala
77dcdab42c
Add loading Animation to Most used Language card (#2197)
* add: text animation

* compact progress done

* cleaned code

* non compact animation done

* tests fixed + prettier

* revert: vercel.json

* remove: unnecessary import

* added parameter in docs

* style: improve syntax

Co-authored-by: rickstaa <rick.staa@outlook.com>
2023-01-10 12:21:35 +00:00
Rick Staa
9eb0c3cbb4
feat: fix 'include_all_commits' inner card margin (#2283) 2022-11-22 09:46:41 +01: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
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
f07cd133d3
fix: fix retry max-out bug (#2121)
* fix: fix retry max-out bug

This commit makes sure that the retry function tests all PATs.

* style: format code

* test: fix retry tests

* style: format code
2022-11-21 10:15:43 +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
5df25a6472
fix: improve boolean parse behaviour (#2029) 2022-11-21 10:10:46 +01:00
Rick Staa
4b656ebabb
refactor: migrate to using arrow functions (#2033) 2022-11-21 10:07:09 +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
Tymoteusz Marzec
f9e95b166d
Corrections of Polish expressions in translations.js (#2240) 2022-10-29 15:41:04 +02: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
Frieder Bluemle
199870aa9f
refactor: fix GitHub capitalization (#2232) 2022-10-26 16:41:59 +02:00
Kurt
bb56e3bb7b
fix: text overlapped on zh-tw locale (#2192) 2022-10-15 08:19:33 +02:00
Rick Staa
54cc291978
Revert "fix: improve json import (#2190)" (#2191)
This reverts commit 65424fa90f.
2022-10-13 11:55:01 +02:00
Rick Staa
65424fa90f
fix: improve json import (#2190) 2022-10-13 11:26:13 +02:00
rickstaa
f7a2b2162b
fix: fix I18n import error 2022-10-13 10:50:32 +02:00
Rick Staa
dea583d426
build: create npm package (#2151)
* build: create npm package

This commit makes sure that the common modules of the GRS package can be
imported as an npm package.

* feat: export card render functions

* style: update formatting
2022-10-13 10:27:19 +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
nekiwo
acbc03dc0f
Fix card length during error (#2105)
* Fix card length during error

Fixes #1774
The size of the box should be 550px to allow 25px padding from both sides
I found the width of the text using `getComputedTextLength()` method

* fix: improve error card size

Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-10-04 10:00:48 +02:00
Jagruti Tiwari
c03bb2f250
fix: adding docstrings to the files where it was missing (#2101)
* fix: adding docstrings to missing files

* style: format code

* style: improve formatting

Co-authored-by: Jagruti Tiwari <jagrutit@cdac.in>
Co-authored-by: rickstaa <rick.staa@outlook.com>
2022-10-03 13:03:23 +02:00