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

[pull] master from anuraghazra:master #90

Merged
merged 85 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
35e4578
docs(contributing guidelines): remove duplicate license section (#3333)
qwerty541 Oct 11, 2023
88c507c
refactor: fix typo in TRY_AGAIN_LATER constant name (#3274)
qwerty541 Oct 12, 2023
3b53bed
docs: add available locales section (#3331)
qwerty541 Oct 12, 2023
18763ae
docs: remove broken sponsor links (#3336)
vishal-sharma-369 Oct 12, 2023
4c7e297
CI: Add static code analysis workflow (CodeQL) (#2918)
qwerty541 Oct 12, 2023
1728bb2
infra: enable no-with eslint rule (#3233)
qwerty541 Oct 12, 2023
d89edc0
infra: enable no-multiple-empty-lines eslint rule (#3262)
qwerty541 Oct 12, 2023
a397851
docs: fix relative README links (#3067)
rickstaa Oct 12, 2023
0fd1ea3
feature: do not aks user's to open issues on upstream API errors (#3273)
qwerty541 Oct 13, 2023
428e97b
Add performance tests base (#3141)
qwerty541 Oct 13, 2023
28b6592
Update generate-theme-doc.js (#3308)
sahilpawar01 Oct 13, 2023
7b1b78d
Revert "Update generate-theme-doc.js (#3308)" (#3353)
rickstaa Oct 13, 2023
1c07f41
feature: fetch only requested data from GitHub GraphQL API to reduce …
qwerty541 Oct 13, 2023
b753d49
infra: enable radix eslint rule (#3261)
qwerty541 Oct 13, 2023
cd9698b
infra: enable no-mixed-spaces-and-tabs eslint rule (#3285)
qwerty541 Oct 13, 2023
7c5e998
ci: fix master branch name in CodeQL analysis workflow (#3354)
qwerty541 Oct 13, 2023
ee7cf1f
docs: add uptime badge (#3350)
rickstaa Oct 13, 2023
7a6d7b4
ci: fix 'update-langs' workflow permissions (#3352)
rickstaa Oct 13, 2023
4fd52e6
ci: fix small theme preview script typo (#3355)
rickstaa Oct 13, 2023
00394cf
docs(themes): improve compatibility message (#3362)
qwerty541 Oct 14, 2023
ac749b7
refactor: resolve vscode type errors in wakatime card render and remo…
qwerty541 Oct 15, 2023
d72ae34
docs: add translations contribution guide (#3360)
qwerty541 Oct 15, 2023
6dc6c61
docs: improve vercel badge position (#3347)
rickstaa Oct 15, 2023
2567a6e
docs: add top issues dashboard notice (#3363)
qwerty541 Oct 15, 2023
8278980
infra: enable no-negated-condition eslint rule (#3283)
qwerty541 Oct 15, 2023
365dfb7
docs(translations): remove broken sponsors links (#3361)
qwerty541 Oct 15, 2023
4e949c2
docs(contributing): remove outdated local dev steps (#3358)
rickstaa Oct 16, 2023
41d19be
Build(deps): Bump rickstaa/empty-issues-closer-action (#3375)
dependabot[bot] Oct 16, 2023
dd528c4
Build(deps): Bump rickstaa/top-issues-action from 1.3.54 to 1.3.56 (#…
dependabot[bot] Oct 16, 2023
c289b10
Build(deps): Bump actions/checkout from 3.5.3 to 4.1.0 (#3377)
dependabot[bot] Oct 16, 2023
bb17789
Build(deps-dev): Bump @testing-library/jest-dom from 6.1.3 to 6.1.4 (…
dependabot[bot] Oct 16, 2023
e7056fb
Build(deps-dev): Bump lint-staged from 14.0.1 to 15.0.1 (#3379)
dependabot[bot] Oct 16, 2023
29c1fef
Build(deps-dev): Bump @babel/traverse from 7.22.8 to 7.23.2 (#3381)
dependabot[bot] Oct 16, 2023
4dc930b
Build(deps-dev): Bump @actions/github from 5.1.1 to 6.0.0 (#3380)
dependabot[bot] Oct 16, 2023
3dab984
docs(contributions): use HTTPS protocol inside license link (#3373)
qwerty541 Oct 17, 2023
b85225b
docs(contributions): improve visability of themes merging policy (#3371)
qwerty541 Oct 17, 2023
bc9076a
docs: use absolute paths for several broken links as temporary soluti…
qwerty541 Oct 18, 2023
885bd1b
docs: add link to translations contribution guidelines (#3390)
qwerty541 Oct 18, 2023
ae35637
docs(contributions): add one theme per pull request rule (#3394)
qwerty541 Oct 19, 2023
33beba5
ci(theme preview): add one theme per pull request rule (#3395)
qwerty541 Oct 21, 2023
3eedfd3
chore(theme): add light and dark catppuccin themes with fix for contr…
cosmojg Oct 22, 2023
cb5ac97
docs: themes addition paused (#3409)
qwerty541 Oct 23, 2023
edeebeb
docs(contributing): themes addition paused (#3408)
qwerty541 Oct 23, 2023
f8aa2db
ci(theme preview): allow gradient themes (#3400)
qwerty541 Oct 23, 2023
3977b90
tests:: allow gradient themes (#3401)
qwerty541 Oct 23, 2023
c795c72
Build(deps): Bump actions/checkout from 4.1.0 to 4.1.1 (#3413)
dependabot[bot] Oct 23, 2023
376aeaa
Build(deps): Bump rickstaa/top-issues-action from 1.3.56 to 1.3.61 (#…
dependabot[bot] Oct 23, 2023
69b1745
Build(deps): Bump bahmutov/npm-install from 1.8.35 to 1.8.36 (#3414)
dependabot[bot] Oct 23, 2023
3d0780b
Build(deps): Bump rickstaa/empty-issues-closer-action (#3417)
dependabot[bot] Oct 23, 2023
453ab19
Build(deps): Bump actions/setup-node from 3.8.1 to 4.0.0 (#3416)
dependabot[bot] Oct 23, 2023
8ee18b8
Build(deps-dev): Bump lint-staged from 15.0.1 to 15.0.2 (#3418)
dependabot[bot] Oct 23, 2023
69cdf00
Build(deps-dev): Bump eslint from 8.51.0 to 8.52.0 (#3419)
dependabot[bot] Oct 23, 2023
23f9cc7
docs(theme): Auto update theme readme (#3407)
qwerty541 Oct 24, 2023
7fe7c63
ci(top issues dashboard): themes addition paused (#3410)
qwerty541 Oct 24, 2023
6bcc98d
fix: fix `WakaTime` brand casing (#3411)
Joehuu Oct 24, 2023
c79fc99
docs(contributing): change protocol from HTTPS to HTTP in local devel…
kafkaidk Oct 26, 2023
8084ba9
i18n: improve Ukrainian translations (#3422)
eternityduck Oct 26, 2023
87a3bf3
ci(theme readme gen): lowercase commit message to match conventional …
qwerty541 Oct 26, 2023
0691084
ci(preview theme): allow gradient colors (2) (#3427)
qwerty541 Oct 26, 2023
db92181
fix(top langs fetcher): fix typo inside error message (#3431)
eternityduck Oct 28, 2023
9c6eb22
feature: render error card in same theme as requested card (resolves …
notpritam Oct 28, 2023
89fc146
refactor: improve blacklisted username error by adding secondary mess…
qwerty541 Oct 30, 2023
5b72dfb
tests(stats card): cover with test changes in #3298 (#3443)
qwerty541 Oct 30, 2023
2feebd0
infra(dependabot): set myself as pull requests reviewer (#3435)
qwerty541 Oct 30, 2023
91a3ac2
Build(deps): Bump rickstaa/empty-issues-closer-action (#3446)
dependabot[bot] Oct 30, 2023
10236d8
Build(deps): Bump ossf/scorecard-action from 2.3.0 to 2.3.1 (#3447)
dependabot[bot] Oct 30, 2023
6cf9bb8
Build(deps): Bump axios from 1.5.1 to 1.6.0 (#3448)
dependabot[bot] Oct 30, 2023
2b90336
Build(deps): Bump rickstaa/top-issues-action from 1.3.61 to 1.3.64 (#…
dependabot[bot] Oct 30, 2023
1886fe0
refactor: update languages JSON (#3450)
github-actions[bot] Oct 31, 2023
2ddcd9c
infra(dependabot): configure commits message to match conventional co…
qwerty541 Oct 31, 2023
ff16984
refactor: fix typos in a comment (#3437)
Wertzui123 Nov 1, 2023
236577f
infra: enable no-class-assign eslint rule (#3451)
qwerty541 Nov 1, 2023
5b3b920
infra: enable no-const-assign eslint rule (#3452)
qwerty541 Nov 1, 2023
90c30f2
infra: enable no-dupe-class-members eslint rule (#3456)
qwerty541 Nov 6, 2023
6d8169f
tests(wakatime-fetcher): fix brand casing (#3455)
qwerty541 Nov 6, 2023
e5b5da8
tests: add basic wakatime endpoint test (#3454)
qwerty541 Nov 6, 2023
79cee30
infra: enable constructor-super eslint rule (#3457)
qwerty541 Nov 7, 2023
bc7ea33
build(deps): Bump rickstaa/empty-issues-closer-action (#3460)
dependabot[bot] Nov 7, 2023
a99abe8
build(deps): Bump rickstaa/top-issues-action from 1.3.64 to 1.3.65 (#…
dependabot[bot] Nov 7, 2023
843b15e
build(deps-dev): Bump eslint from 8.52.0 to 8.53.0 (#3459)
dependabot[bot] Nov 7, 2023
8d7e9df
themes: add ambient_gradient theme for test (#3399)
qwerty541 Nov 7, 2023
dda9647
fix(express deploy): fix situations when env variables doesn't load b…
wolfcomp Nov 7, 2023
aa90efc
docs(theme): auto update theme readme (#3462)
qwerty541 Nov 7, 2023
edf9f74
infra: enable keyword-spacing eslint rule and remove decrecated space…
qwerty541 Nov 10, 2023
5ea6595
infra: enable no-delete-var eslint rule (#3465)
qwerty541 Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 12 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
"terms": [ "TODO", "FIXME" ],
"location": "start"
}],
// "no-with": "warn",
// "radix": "warn",
"no-with": "warn",
"radix": "warn",
// "vars-on-top": "error",

// Enforces the style of wrapped functions
Expand All @@ -113,7 +113,7 @@

// "init-declarations": [ "error", "always" ],
// "no-catch-shadow": "warn",
// "no-delete-var": "error",
"no-delete-var": "error",
// "no-label-var": "error",
// "no-shadow-restricted-names": "error",
// "no-shadow": "warn",
Expand Down Expand Up @@ -150,12 +150,12 @@
// "arrow-body-style": [ "error", "always" ],
// "arrow-parens": [ "error", "always" ],
// "arrow-spacing": [ "error", { "before": true, "after": true }],
// "constructor-super": "error",
"constructor-super": "error",
// "generator-star-spacing": [ "error", "before" ],
// "no-arrow-condition": "error",
// "no-class-assign": "error",
// "no-const-assign": "error",
// "no-dupe-class-members": "error",
"no-class-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-this-before-super": "error",
// "no-var": "warn",
"object-shorthand": [ "warn" ],
Expand Down Expand Up @@ -193,9 +193,9 @@
// "no-continue": "off",
// "no-inline-comments": "off",
// "no-lonely-if": "warn",
// "no-mixed-spaces-and-tabs": "warn",
// "no-multiple-empty-lines": "warn",
// "no-negated-condition": "off",
"no-mixed-spaces-and-tabs": "warn",
"no-multiple-empty-lines": "warn",
"no-negated-condition": "warn",
// "no-nested-ternary": "warn",
// "no-new-object": "warn",
// "no-plusplus": "off",
Expand All @@ -217,14 +217,13 @@
"MethodDefinition": true,
"ClassDeclaration": false
}
}]
}],
// "semi-spacing": [ "warn", { "before": false, "after": true }],
// "semi": [ "error", "always" ],
// "sort-vars": "off",
// "space-after-keywords": [ "warn", "always" ],
"keyword-spacing": ["error", { "before": true, "after": true }]
// "space-before-blocks": [ "warn", "always" ],
// "space-before-function-paren": [ "warn", "never" ],
// "space-before-keywords": [ "warn", "always" ],
// "space-in-parens": [ "warn", "never" ],
// "space-infix-ops": [ "warn", { "int32Hint": true } ],
// "space-return-throw-case": "error",
Expand Down
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,20 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 10
commit-message:
prefix: "build(deps)"
prefix-development: "build(deps-dev)"
reviewers:
- "qwerty541"

# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
commit-message:
prefix: "build(deps)"
prefix-development: "build(deps-dev)"
reviewers:
- "qwerty541"
41 changes: 41 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Static code analysis workflow (CodeQL)"

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
actions: read
checks: read
contents: read
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: write
statuses: read

jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.repository == 'anuraghazra/github-readme-stats'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Deployment Prep
run: python ./.github/workflows/deploy-prep.py
- uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/empty-issues-closer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
runs-on: ubuntu-latest
steps:
# NOTE: Retrieve issue templates.
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Run empty issues closer action
uses: rickstaa/empty-issues-closer-action@e9e79c66b85961ebc9dc11493b65b6e4bb355ed0 # v1.1.28
uses: rickstaa/empty-issues-closer-action@37f2cd30a4fb97504bbb570dc73264cfa522dee3 # v1.1.40
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-theme-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ossf-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: npm

- uses: bahmutov/npm-install@c46e3830503dcb831cf4aee3f26b4e6bce8cc9d2 # v1.8.35
- uses: bahmutov/npm-install@2509f13e8485d88340a789a3f7ca11aaac47c9fc # v1.8.36
with:
useLockFile: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prs-cache-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Cleanup
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/stale-theme-pr-closer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: npm

- uses: bahmutov/npm-install@c46e3830503dcb831cf4aee3f26b4e6bce8cc9d2 # v1.8.35
- uses: bahmutov/npm-install@2509f13e8485d88340a789a3f7ca11aaac47c9fc # v1.8.36
with:
useLockFile: false

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand All @@ -35,6 +35,10 @@ jobs:
run: |
npm run lint

- name: Run bench tests
run: |
npm run bench

- name: Run Prettier
run: |
npm run format:check
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/top-issues-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run top issues action
uses: rickstaa/top-issues-action@a2f94d3653b3c2490e0d997c8ec4a5e7beba4c7d # v1.3.54
uses: rickstaa/top-issues-action@da2fb7f2bd61828135e0971f8d33efb1a079e9a9 # v1.3.65
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -47,7 +47,3 @@ jobs:
top_bugs: true
top_features: true
top_pull_requests: true
custom_pull_requests_label: themes
top_custom_pull_requests_label: ":star: top themes"
top_custom_pull_requests_label_description: Top themes
top_custom_pull_requests_label_colour: "#A23599"
6 changes: 3 additions & 3 deletions .github/workflows/update-langs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
permissions:
actions: read
checks: read
contents: read
contents: write
deployments: read
issues: read
discussions: read
Expand All @@ -36,10 +36,10 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
*.lock
.idea/
coverage
benchmarks
vercel_token

# IDE
Expand Down
25 changes: 8 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,28 @@ _(make sure you already have a [Vercel](https://vercel.com/) account)_
2. Fork the repository and clone the code to your local machine.
3. Run `npm install` in the repository root.
4. Run the command `vercel` in the root and follow the steps there.
5. Open `vercel.json` and set the maxDuration to 10.
6. Create a `.env` file in the root of the directory.
7. In the .env file add a new variable named `PAT_1` with your [GitHub Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).
8. Run the command `vercel dev` to start a development server at <https://localhost:3000>.
9. The cards will then be available from this local endpoint (i.e. `https://localhost:3000/api?username=anuraghazra`).
5. Run the command `vercel dev` to start a development server at <http://localhost:3000>.
6. The cards will then be available from this local endpoint (i.e. `http://localhost:3000/api?username=anuraghazra`).

> [!NOTE]\
> You can debug the package code in [Vscode](https://code.visualstudio.com/) by using the [Node.js: Attach to process](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_setting-up-an-attach-configuration) debug option. You can also debug any tests using the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest). For more information, see https://github.com/jest-community/vscode-jest/issues/912.

## Themes Contribution

GitHub Readme Stats supports custom theming, and you can also contribute new themes!
We're currently paused addition of new themes to decrease maintenance efforts. All pull requests related to new themes will be closed.

> [!NOTE]\
> If you are contributing your theme just because you are using it personally, then you can [customize the looks](./readme.md#customization) of your card with URL params instead.
> If you are considering contributing your theme just because you are using it personally, then instead of adding it to our theme collection, you can use card [customization options](./readme.md#customization).

> [!NOTE]\
> Keep in mind that we already have a vast collection of different themes. To keep their number manageable, we began to add only themes supported by the community. Your pull request with theme addition will be merged once we get enough positive feedback from the community in the form of thumbs up :+1: emojis (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). We expect to see at least 10-15 thumbs up before making a decision to merge your pull request into the master branch. Remember that you can also support themes of other contributors that you liked to speed up their merge.
## Translations Contribution

> [!NOTE]\
> Before submitting pull request, please make sure that your theme pass WCAG 2.0 level AA contrast ration test. You can use [this tool](https://webaim.org/resources/contrastchecker/) to check it.
GitHub Readme Stats supports multiple languages, if we are missing your language, you can contribute it! You can check the currently supported languages [here](./readme.md#available-locales).

To contribute your theme you need to edit the [themes/index.js](./themes/index.js) file and add it at the end of the file.
To contribute your language you need to edit the [src/translations.js](./src/translations.js) file and add new property to each object where the key is the language code in [ISO 639-1 standard](https://www.andiamo.co.uk/resources/iso-language-codes/) and the value is the translated string.

## Any contributions you make will be under the MIT Software License

In short, when you submit changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
In short, when you submit changes, your submissions are understood to be under the same [MIT License](https://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report issues/bugs using GitHub's [issues](https://github.com/anuraghazra/github-readme-stats/issues)

Expand Down Expand Up @@ -113,7 +108,3 @@ People _love_ thorough bug reports. I'm not even kidding.
- A quick idea summary
- What & why do you want to add the specific feature
- Additional context like images, links to resources to implement the feature, etc.

## License

By contributing, you agree that your contributions will be licensed under its [MIT License](./LICENSE).
20 changes: 18 additions & 2 deletions api/gist.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ export default async (req, res) => {
res.setHeader("Content-Type", "image/svg+xml");

if (locale && !isLocaleAvailable(locale)) {
return res.send(renderError("Something went wrong", "Language not found"));
return res.send(
renderError("Something went wrong", "Language not found", {
title_color,
text_color,
bg_color,
border_color,
theme,
}),
);
}

try {
Expand Down Expand Up @@ -83,6 +91,14 @@ export default async (req, res) => {
CONSTANTS.ERROR_CACHE_SECONDS
}, stale-while-revalidate=${CONSTANTS.ONE_DAY}`,
); // Use lower cache period for errors.
return res.send(renderError(err.message, err.secondaryMessage));
return res.send(
renderError(err.message, err.secondaryMessage, {
title_color,
text_color,
bg_color,
border_color,
theme,
}),
);
}
};