Commit Graph

56 Commits

Author SHA1 Message Date
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
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
3e66189c44
feat: add CACHE_SECONDS environment variable (#2266)
* feat: add CACHE_SECONDS environment variable

This commit adds the CACHE_SECONDS environment variable. This variable
can be used to circumvent our cache clamping values for self hosted
Vercel instances.

* refactor: apply formatter
2023-06-09 04:44:42 +03: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
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
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
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
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
Rick Staa
4df8094e52
fix: prevent errors from being cached (#2160) 2022-10-09 20:23:31 +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
f9c0e0bff6. 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
Anurag Hazra
9d2bfd9d8f
fix: temporarily increase the cache hours (#1771) 2022-05-19 00:48:26 +05:30
Anurag Hazra
02ebd3243b
refactor: jsdoc in utils & minor changes (#1377)
* refactor: jsdoc in utils & minor changes

* chore: jsdoc Card class

* chore: jsdoc for getStyles
2021-10-10 20:41:40 +05:30
Rishi Suresh
7a096acf66
feat: added border_color option (#1000)
* feat: Allow customization of border color

* docs: Update readme
2021-04-28 00:28:44 +05:30
Teddy Heinen
c8a5e835a5
feat: add corner rounding parameter so we can make square cards (#845)
* add corner rounding parameter so i can make square cards

* rename rx to border_radius
2021-03-07 22:23:32 +05:30
Anurag Hazra
f7f11d0b25
feat: added disable_animations flag (#643) 2020-11-14 18:52:36 +05:30
Anurag Hazra
10d8ca6a38
fix: fixed available locale list (#603) 2020-10-31 14:50:46 +05:30
Nathan Chu
f1df178643
feat: card locale translations (#509)
* Add Card Translations

* Add tests and documentation for `?lang` option

* Card Translations: update Italian

* Run Prettier

* Correct German Translations.

Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>

* refactor: added i18n class to manage translation logic & improved code

* Make the new src/translations.js more concise

* Update translations.js

Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>

* Revert 4175484d69

* fix: overlap because of language length

Co-authored-by: lrusso96 <russo.1699981@studenti.uniroma1.it>
Co-authored-by: schmelto <30869493+schmelto@users.noreply.github.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2020-10-04 13:35:15 +05:30
Nathan Chu
057ff69ac2
feat: custom card title (#293)
* Custom stats title (anuraghazra#229)

* Add custom title test

* remove unused code

* Update readme.md to include the `custom_title` option

* Update readme_es.md to include `custom_title` option

Co-Authored-By: José Javier Rodríguez Zas <jjavierdguezas@gmail.com>

* Merge branch 'master' of https://github.com/anuraghazra/github-readme-stats.git into custom-title

* feat: added customTitle option in Card

Co-authored-by: José Javier Rodríguez Zas <jjavierdguezas@gmail.com>
Co-authored-by: Anurag <hazru.anurag@gmail.com>
2020-09-27 13:10:39 +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
6fa8c26754
fix: added temporary blacklist (#399) 2020-08-17 14:18:17 +05:30
Anurag Hazra
056aaaf189
fix: catched all errors (#384) 2020-08-13 21:18:26 +05:30
Anurag Hazra
ec246d27ab
fix: increase cache 2020-08-13 19:26:42 +05:30
Anurag Hazra
ee513240ef
feat: adde CustomError class for better secondary errors (#355) 2020-08-10 19:36:56 +05:30
Anurag Hazra
67b434dc79
chore(*): reorganized all files and folders (#283) 2020-08-02 13:07:26 +05:30
Anurag Hazra
416f027fae
fix: total commit counts (#211)
* fix: wip fix total commit counts

* tests: added tests

* chore: remove console logs

* docs: added docs for include_all_commits

* chore: increased value offset x

* chore: added reference/links comments

* docs: updated docs
2020-07-31 13:37:39 +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
Arjun Mahishi
c2adcfd6fe
feat: hide specific languages in "Top languages" card (#150)
* add new query param to hide specific languages in top languages card

* [top-langs] add function to clean out the provided lang name

* [top-langs] rename 'hide_lang' => 'hide', refactor logic for parsing the list of provided languages to hide

* [top-langs] take list of languages to hide, as a json array

* chore: minor changes

* docs: added docs for hide lang

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
2020-07-23 19:47:04 +05:30
anuraghazra
fdf445d734 feat: added ability to set custom cache 2020-07-20 21:43:51 +05:30
Anurag Hazra
2c26329e13
feat: added inbuilt themes (#105)
* feat: added inbuilt themes

* docs: added theming docs

* docs: update docs
2020-07-19 20:34:41 +05:30
Anurag Hazra
2709d5b434
feat: added hide_title option (#88) 2020-07-17 23:01:16 +05:30
anuraghazra
5fce46d67c fix: query param booleans 2020-07-15 18:32:16 +05:30
anuraghazra
429d65a52b refactor: refactored retryer logic & handled invalid tokens 2020-07-15 17:46:31 +05:30
anuraghazra
3d8dea90e2 fix: github rate limiter with multiple PATs 2020-07-15 14:59:25 +05:30
anuraghazra
db49ca7b71 feat: added rankings 2020-07-13 19:41:47 +05:30
anuraghazra
9af56df2c1 feat: added bg_color options, added RepoCard color options too 2020-07-12 12:46:08 +05:30
JoaoVSouto
59b8bded9c feat: receives text, title and icon colors from URL 2020-07-11 16:01:44 -03:00
anuraghazra
3180144fa4 chore: ignore lock file 2020-07-11 23:20:42 +05:30
anuraghazra
45941f6c70 test: added test & refactored files 2020-07-11 22:10:13 +05:30
Omid Nikrah
9083ae3e49
Use destructuring props assignment 2020-07-10 21:35:14 +04:30
anuraghazra
4292212b30 feat: added better error handling 2020-07-10 18:12:31 +05:30
anuraghazra
9f1e90ad2c refactor: refactored code & added line_height option 2020-07-09 21:29:50 +05:30