Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop/master #1

Merged
merged 56 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
fede678
docs: better navigation in readme (#1196)
abrj7 Jul 20, 2021
2ea5f09
docs(cn): replace error picture (#1217)
Jul 29, 2021
ae6b56b
docs: fix grammar (#1242)
yehwankim23 Aug 14, 2021
7907a5d
fix: subfolder support for api_domain wakatime api (#1235)
AlexandroPerez Aug 14, 2021
8f31634
docs(theme): Auto update theme readme (#1263)
178inaba Aug 24, 2021
1a3edca
feat: hide wakatime languages (#1212)
Morphclue Aug 27, 2021
d790404
fix: text overlap (#1207)
Morphclue Sep 2, 2021
eb98a21
chore: grammar error on CONTRIBUTING.md (#1272)
philipbrembeck Sep 2, 2021
653fb38
chore: update funding link (#1289)
anuraghazra Sep 4, 2021
98ceb75
chore: revert total stars naming
anuraghazra Sep 4, 2021
c3ecd0c
chore: change `total stars` to `total stars earned` (#1293)
anuraghazra Sep 5, 2021
c7fd3ed
docs: replace '?theme' with '&theme' (#1307)
moebachrouch Sep 12, 2021
4dbb9e9
style(theme): added aura_dark themes (#1312)
HorebZ Sep 15, 2021
97690e1
feat(layout): improve flexLayout & fixed layout overlaps (#1314)
anuraghazra Sep 18, 2021
ded06f2
chore: added under-the-hood blogpost link in contributing.md
anuraghazra Sep 22, 2021
ec8eb0c
style(theme): added panda theme (#1319)
chandrikadeb7 Sep 26, 2021
62d65ab
refactor: refactor repo card (#1325)
anuraghazra Sep 26, 2021
b9230cd
chore: update theme preview bot content (#1326)
anuraghazra Sep 26, 2021
f9c0e0b
Change default stats card width with hide rank
postatum Sep 28, 2021
cc28273
Add tests for stats card with card_width
postatum Sep 28, 2021
dc78bad
Add card_width Stats Card description to readme
postatum Sep 28, 2021
927e87d
docs: match link with section title (#1341)
Oct 1, 2021
ab4876a
style(theme): added cobalt2 theme (#1343)
RedHeadphone Oct 1, 2021
efd0a8b
style(theme): added noctis minimus theme (#1342)
Anant-mishra1729 Oct 1, 2021
7d1c9b0
chore: fix grammatical errors in the scripts (#1346)
CleanMachine1 Oct 1, 2021
81b6593
chore: reduce vercel memory & timeout duration (#1366)
anuraghazra Oct 6, 2021
d0ab2ff
fix: wakatime card translations (#1363)
jjsanmartino03 Oct 6, 2021
02ebd32
refactor: jsdoc in utils & minor changes (#1377)
anuraghazra Oct 10, 2021
2723f00
ci(workflow): add 'npm' cache for actions/setup-node in .github/workf…
oscard0m Oct 13, 2021
596a4ec
Revert "ci(workflow): add 'npm' cache for actions/setup-node in .gith…
anuraghazra Oct 13, 2021
300ee85
chore: remove action cache
anuraghazra Oct 13, 2021
7072a23
style(theme): add gruvbox_light theme (#1379)
schnerring Oct 13, 2021
ded7e8a
docs(theme): Auto update theme readme (#1384)
anuraghazra Oct 13, 2021
02e714a
fix: word-wrap bug (#1378)
Marcholio Oct 18, 2021
d049f06
fix: hotfix for graphql api error (#1409)
anuraghazra Oct 23, 2021
bc6c22e
docs: add fork instructions (#1418)
anuraghazra Oct 25, 2021
f642627
fix: add icon width to stats-card min width calculation
rickstaa Nov 4, 2021
34d6423
fix: fixes rank circle padding problem
rickstaa Nov 4, 2021
28fa0b8
fix: bug where wakatime api returns undefined languages (#1403)
Marcholio Nov 5, 2021
53acb53
style(themes): aura theme (#1423)
Nov 5, 2021
22ab081
style(theme): added swift theme (#1395)
santieduardo Nov 5, 2021
2249bf4
docs(theme): Auto update theme readme (#1440)
anuraghazra Nov 5, 2021
42e9b78
feat(script): improved theme preview script (#1439)
anuraghazra Nov 5, 2021
563dc7c
feat(theme-preview): added ability to upsert comments (#1442)
anuraghazra Nov 6, 2021
7eade85
chore: update github action trigger
anuraghazra Nov 6, 2021
77d016f
chore: remove edit event from action
anuraghazra Nov 6, 2021
d8b5c9d
Merge pull request #1 from rickstaa/include_icons_in_min_width_calcul…
postatum Nov 8, 2021
1cef6ac
chore(deps): update axios to 0.24.0 (https://github.com/axios/axios/p…
abhint Nov 8, 2021
709a65a
style: improve code structure
rickstaa Nov 9, 2021
741f8bd
fix: fix stats and language tests
rickstaa Nov 9, 2021
ecd7d98
style(theme): add apprentice theme (#1466)
cinaryilmaz Nov 22, 2021
798bf72
fix: auth token header (#1474)
anuraghazra Nov 25, 2021
eca0f42
Merge branch 'anuraghazra:master' into develop/master
rickstaa Dec 1, 2021
0637911
feat(stats): add 'not_bold' option to stats card
rickstaa Nov 22, 2021
33ac565
fix: decrease maxduration
rickstaa Dec 1, 2021
222b707
Merge remote-tracking branch 'post/i1170_customizable_stats_card_widt…
rickstaa Dec 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: [anuraghazra] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ jobs:
with:
node-version: "12.x"

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key:
${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-

- name: Install & Test
run: |
npm install
Expand Down
11 changes: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Pull requests are the best way to propose changes. We actively welcome your pull
1. If you've changed APIs, update the documentation.
1. Issue that pull request!

## Under the hood of github-readme-stats

Interested in diving deeper into understanding how github-readme-stats works?

[Bohdan](https://github.com/Bogdan-Lyashenko) wrote an amazing in-depth post about it, check it out:

**[Under the hood of github-readme-stats project](https://codecrumbs.io/library/github-readme-stats)**


## Local Development

To run & test github-readme-stats you need to follow few simple steps :-
Expand Down Expand Up @@ -71,7 +80,7 @@ We use GitHub issues to track public bugs. Report a bug by [opening a new issue]

**Q:** How to count private stats?

> **Ans:** We can only count private commits & we cannot access any other private info of any users, so it's not possible. only way is to deploy on your own instance & use your own PAT (Personal Access Token)
> **Ans:** We can only count public commits & we cannot access any other private info of any users, so it's not possible. The only way to count your personal private stats is to deploy on your own instance & use your own PAT (Personal Access Token)

### Bug Reports

Expand Down
10 changes: 6 additions & 4 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = async (req, res) => {
hide,
hide_title,
hide_border,
card_width,
hide_rank,
show_icons,
count_private,
Expand All @@ -25,6 +26,7 @@ module.exports = async (req, res) => {
title_color,
icon_color,
text_color,
text_bold,
bg_color,
theme,
cache_seconds,
Expand All @@ -35,8 +37,6 @@ module.exports = async (req, res) => {
border_color,
role,
} = req.query;
let stats;

res.setHeader("Content-Type", "image/svg+xml");

if (blacklist.includes(username)) {
Expand All @@ -48,11 +48,11 @@ module.exports = async (req, res) => {
}

try {
stats = await fetchStats(
const stats = await fetchStats(
username,
parseArray(role),
parseBoolean(count_private),
parseBoolean(include_all_commits),
parseArray(role),
);

const cacheSeconds = clampValue(
Expand All @@ -69,12 +69,14 @@ module.exports = async (req, res) => {
show_icons: parseBoolean(show_icons),
hide_title: parseBoolean(hide_title),
hide_border: parseBoolean(hide_border),
card_width: parseInt(card_width, 10),
hide_rank: parseBoolean(hide_rank),
include_all_commits: parseBoolean(include_all_commits),
line_height,
title_color,
icon_color,
text_color,
text_bold: parseBoolean(text_bold),
bg_color,
theme,
custom_title,
Expand Down
6 changes: 2 additions & 4 deletions api/pin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ module.exports = async (req, res) => {
border_color,
} = req.query;

let repoData;

res.setHeader("Content-Type", "image/svg+xml");

if (blacklist.includes(username)) {
Expand All @@ -40,7 +38,7 @@ module.exports = async (req, res) => {
}

try {
repoData = await fetchRepo(username, repo);
const repoData = await fetchRepo(username, repo);

let cacheSeconds = clampValue(
parseInt(cache_seconds || CONSTANTS.TWO_HOURS, 10),
Expand All @@ -53,7 +51,7 @@ module.exports = async (req, res) => {
and if both are zero we are not showing the stats
so we can just make the cache longer, since there is no need to frequent updates
*/
const stars = repoData.stargazers.totalCount;
const stars = repoData.starCount;
const forks = repoData.forkCount;
const isBothOver1K = stars > 1000 && forks > 1000;
const isBothUnder1 = stars < 1 && forks < 1;
Expand Down
6 changes: 2 additions & 4 deletions api/top-langs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ module.exports = async (req, res) => {
border_color,
role,
} = req.query;
let topLangs;

res.setHeader("Content-Type", "image/svg+xml");

if (blacklist.includes(username)) {
Expand All @@ -45,10 +43,10 @@ module.exports = async (req, res) => {
}

try {
topLangs = await fetchTopLanguages(
const topLangs = await fetchTopLanguages(
username,
parseArray(exclude_repo),
parseArray(role),
parseArray(exclude_repo),
parseArray(hide),
);

Expand Down
5 changes: 4 additions & 1 deletion api/wakatime.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ const {
renderError,
parseBoolean,
clampValue,
parseArray,
CONSTANTS,
isLocaleAvailable,
} = require("../src/common/utils");
const { isLocaleAvailable } = require("../src/translations");
const { fetchWakatimeStats } = require("../src/fetchers/wakatime-fetcher");
const wakatimeCard = require("../src/cards/wakatime-card");

Expand All @@ -26,6 +27,7 @@ module.exports = async (req, res) => {
locale,
layout,
langs_count,
hide,
api_domain,
range,
border_radius,
Expand Down Expand Up @@ -58,6 +60,7 @@ module.exports = async (req, res) => {
custom_title,
hide_title: parseBoolean(hide_title),
hide_border: parseBoolean(hide_border),
hide: parseArray(hide),
line_height,
title_color,
icon_color,
Expand Down
2 changes: 1 addition & 1 deletion docs/readme_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ _注意:热门语言并不表示我的技能水平或类似的水平,它是
1. 选择 `Import Git Repository`
![](https://files.catbox.moe/pqub9q.png)
1. 选择 root 并将所有内容保持不变,并且只需添加名为 PAT_1 的环境变量(如图所示),其中将包含一个个人访问令牌(PAT),你可以在[这里](https://github.com/settings/tokens/new)轻松创建(保留默认,并且只需要命名下,名字随便)
![](https://files.catbox.moe/caem5b.png)
![](https://files.catbox.moe/0ez4g7.png)
1. 点击 deploy,这就完成了,查看你的域名就可使用 API 了!

</details>
Expand Down
2 changes: 1 addition & 1 deletion docs/readme_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

- [Tarjeta de estadísticas de GitHub](#tarjeta-de-estadísticas-de-github)
- [Pins adicionales de GitHub](#pines-adicionales-de-github)
- [Top Languages Card](#tarjeta-de-lenguajes-principales)
- [Tarjeta de Lenguajes Principales](#tarjeta-de-lenguajes-principales)
- [Wakatime Week Stats](#estadísticas-de-la-semana-de-wakatime)
- [Temas](#temas)
- [Personalización](#personalización)
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
"@actions/github": "^4.0.0",
"@testing-library/dom": "^7.20.0",
"@testing-library/jest-dom": "^5.11.0",
"axios": "^0.19.2",
"axios": "^0.24.0",
"axios-mock-adapter": "^1.18.1",
"color-contrast-checker": "^2.1.0",
"css-to-object": "^1.1.0",
"hjson": "^3.2.2",
"husky": "^4.2.5",
"jest": "^26.1.0",
"lodash.snakecase": "^4.1.1",
"parse-diff": "^0.7.0"
},
"dependencies": {
Expand Down
14 changes: 12 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ Your small help goes a long way. :heart:
- [Wakatime Week Stats](#wakatime-week-stats)
- [Themes](#themes)
- [Customization](#customization)
- [Common Options](#common-options)
- [Stats Card Exclusive Options](#stats-card-exclusive-options)
- [Repo Card Exclusive Options](#repo-card-exclusive-options)
- [Language Card Exclusive Options](#language-card-exclusive-options)
- [Wakatime Card Exclusive Option](#wakatime-card-exclusive-options)
- [Deploy Yourself](#deploy-on-your-own-vercel-instance)

# GitHub Stats Card
Expand Down Expand Up @@ -113,7 +118,7 @@ To hide any specific stats, you can pass a query parameter `?hide=` with comma-s

You can add the count of all your private contributions to the total commits count by using the query parameter `?count_private=true`.

_Note: If you are deploying this project yourself, the private contributions will be counted by default otherwise you need to chose to share your private contribution counts._
_Note: If you are deploying this project yourself, the private contributions will be counted by default. Otherwise, you need to choose to share your private contribution counts._

> Options: `&count_private=true`

Expand All @@ -133,7 +138,7 @@ To enable icons, you can pass `show_icons=true` in the query param, like so:

With inbuilt themes, you can customize the look of the card without doing any [manual customization](#customization).

Use `?theme=THEME_NAME` parameter like so :-
Use `&theme=THEME_NAME` parameter like so :-

```md
![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=radical)
Expand Down Expand Up @@ -178,12 +183,14 @@ You can provide multiple comma-separated values in bg_color option to render a g

- `hide` - Hides the specified items from stats _(Comma-separated values)_
- `hide_title` - _(boolean)_
- `card_width` - Set the card's width manually _(number)_
- `hide_rank` - _(boolean)_ hides the rank and automatically resizes the card width
- `show_icons` - _(boolean)_
- `include_all_commits` - Count total commits instead of just the current year commits _(boolean)_
- `count_private` - Count private commits _(boolean)_
- `line_height` - Sets the line-height between text _(number)_
- `custom_title` - Sets a custom title for the card
- `text_bold` - Use bold text _(boolean)_
- `disable_animations` - Disables all animations in the card _(boolean)_

#### Repo Card Exclusive Options:
Expand All @@ -207,6 +214,7 @@ You can provide multiple comma-separated values in bg_color option to render a g

#### Wakatime Card Exclusive Options:

- `hide` - Hide the languages specified from the card _(Comma-separated values)_
- `hide_title` - _(boolean)_
- `line_height` - Sets the line-height between text _(number)_
- `hide_progress` - Hides the progress bar and percentage _(boolean)_
Expand Down Expand Up @@ -405,6 +413,7 @@ NOTE: Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58) we
![](https://files.catbox.moe/btd78j.jpeg)
1. Sign into GitHub and allow access to all repositories, if prompted
1. Fork this repo
1. After forking the repo, open the [`vercel.json`](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json#L5) file and change the `maxDuration` field to `10`
1. Go back to your [Vercel dashboard](https://vercel.com/dashboard)
1. Select `Import Project`
![](https://files.catbox.moe/qckos0.png)
Expand Down Expand Up @@ -437,3 +446,4 @@ Thanks! :heart:
Contributions are welcome! <3

Made with :heart: and JavaScript.

4 changes: 2 additions & 2 deletions scripts/generate-theme-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const THEME_TEMPLATE = `## Available Themes

<!-- DO NOT EDIT THIS FILE DIRECTLY -->

With inbuilt themes you can customize the look of the card without doing any manual customization.
With inbuilt themes, you can customize the look of the card without doing any manual customization.

Use \`?theme=THEME_NAME\` parameter like so :-

Expand Down Expand Up @@ -43,7 +43,7 @@ ${REPO_CARD_LINKS_FLAG}

[add-theme]: https://github.com/anuraghazra/github-readme-stats/edit/master/themes/index.js

Wanted to add a new theme? Consider reading the [contribution guidelines](../CONTRIBUTING.md#themes-contribution) :D
Want to add a new theme? Consider reading the [contribution guidelines](../CONTRIBUTING.md#themes-contribution) :D
`;

const createRepoMdLink = (theme) => {
Expand Down
Loading