forked from mirrored/github-readme-stats
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3afe547077 |
-235
@@ -1,235 +0,0 @@
|
|||||||
{
|
|
||||||
"env": {
|
|
||||||
"node": true,
|
|
||||||
"browser": true,
|
|
||||||
"es2021": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
// "eslint:recommended",
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
|
||||||
"sourceType": "module",
|
|
||||||
"ecmaVersion": 2022
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
// Possible Errors (overrides from recommended set)
|
|
||||||
|
|
||||||
// "no-extra-parens": "error",
|
|
||||||
// "no-unexpected-multiline": "error",
|
|
||||||
|
|
||||||
// All JSDoc comments must be valid
|
|
||||||
|
|
||||||
// "valid-jsdoc": [ "error", {
|
|
||||||
// "requireReturn": false,
|
|
||||||
// "requireReturnDescription": false,
|
|
||||||
// "requireParamDescription": true,
|
|
||||||
// "prefer": {
|
|
||||||
// "return": "returns"
|
|
||||||
// }
|
|
||||||
// }],
|
|
||||||
|
|
||||||
// Best Practices
|
|
||||||
|
|
||||||
// Allowed a getter without setter, but all setters require getters
|
|
||||||
|
|
||||||
// "accessor-pairs": [ "error", {
|
|
||||||
// "getWithoutSet": false,
|
|
||||||
// "setWithoutGet": true
|
|
||||||
// }],
|
|
||||||
// "block-scoped-var": "warn",
|
|
||||||
// "consistent-return": "error",
|
|
||||||
// "curly": "error",
|
|
||||||
// "default-case": "warn",
|
|
||||||
|
|
||||||
// the dot goes with the property when doing multiline
|
|
||||||
|
|
||||||
// "dot-location": [ "warn", "property" ],
|
|
||||||
// "dot-notation": "warn",
|
|
||||||
// "eqeqeq": [ "error", "smart" ],
|
|
||||||
// "guard-for-in": "warn",
|
|
||||||
// "no-alert": "error",
|
|
||||||
// "no-caller": "error",
|
|
||||||
// "no-case-declarations": "warn",
|
|
||||||
// "no-div-regex": "warn",
|
|
||||||
// "no-else-return": "warn",
|
|
||||||
// "no-empty-label": "warn",
|
|
||||||
// "no-empty-pattern": "warn",
|
|
||||||
// "no-eq-null": "warn",
|
|
||||||
// "no-eval": "error",
|
|
||||||
// "no-extend-native": "error",
|
|
||||||
// "no-extra-bind": "warn",
|
|
||||||
// "no-floating-decimal": "warn",
|
|
||||||
// "no-implicit-coercion": [ "warn", {
|
|
||||||
// "boolean": true,
|
|
||||||
// "number": true,
|
|
||||||
// "string": true
|
|
||||||
// }],
|
|
||||||
// "no-implied-eval": "error",
|
|
||||||
// "no-invalid-this": "error",
|
|
||||||
// "no-iterator": "error",
|
|
||||||
// "no-labels": "warn",
|
|
||||||
// "no-lone-blocks": "warn",
|
|
||||||
// "no-loop-func": "error",
|
|
||||||
// "no-magic-numbers": "warn",
|
|
||||||
// "no-multi-spaces": "error",
|
|
||||||
// "no-multi-str": "warn",
|
|
||||||
// "no-native-reassign": "error",
|
|
||||||
// "no-new-func": "error",
|
|
||||||
// "no-new-wrappers": "error",
|
|
||||||
// "no-new": "error",
|
|
||||||
// "no-octal-escape": "error",
|
|
||||||
// "no-param-reassign": "error",
|
|
||||||
// "no-process-env": "warn",
|
|
||||||
// "no-proto": "error",
|
|
||||||
// "no-redeclare": "error",
|
|
||||||
// "no-return-assign": "error",
|
|
||||||
// "no-script-url": "error",
|
|
||||||
// "no-self-compare": "error",
|
|
||||||
// "no-throw-literal": "error",
|
|
||||||
// "no-unused-expressions": "error",
|
|
||||||
// "no-useless-call": "error",
|
|
||||||
// "no-useless-concat": "error",
|
|
||||||
// "no-void": "warn",
|
|
||||||
|
|
||||||
// Produce warnings when something is commented as TODO or FIXME
|
|
||||||
|
|
||||||
// "no-warning-comments": [ "warn", {
|
|
||||||
// "terms": [ "TODO", "FIXME" ],
|
|
||||||
// "location": "start"
|
|
||||||
// }],
|
|
||||||
// "no-with": "warn",
|
|
||||||
// "radix": "warn",
|
|
||||||
// "vars-on-top": "error",
|
|
||||||
|
|
||||||
// Enforces the style of wrapped functions
|
|
||||||
// "wrap-iife": [ "error", "outside" ],
|
|
||||||
// "yoda": "error",
|
|
||||||
|
|
||||||
// Strict Mode - for ES6, never use strict.
|
|
||||||
// "strict": [ "error", "never" ],
|
|
||||||
|
|
||||||
// Variables
|
|
||||||
|
|
||||||
// "init-declarations": [ "error", "always" ],
|
|
||||||
// "no-catch-shadow": "warn",
|
|
||||||
// "no-delete-var": "error",
|
|
||||||
// "no-label-var": "error",
|
|
||||||
// "no-shadow-restricted-names": "error",
|
|
||||||
// "no-shadow": "warn",
|
|
||||||
|
|
||||||
// We require all vars to be initialized (see init-declarations)
|
|
||||||
// If we NEED a var to be initialized to undefined, it needs to be explicit
|
|
||||||
|
|
||||||
"no-undef-init": "off",
|
|
||||||
"no-undef": "error",
|
|
||||||
"no-undefined": "off",
|
|
||||||
"no-unused-vars": "warn",
|
|
||||||
|
|
||||||
// Disallow hoisting - let & const don't allow hoisting anyhow
|
|
||||||
|
|
||||||
// "no-use-before-define": "error",
|
|
||||||
|
|
||||||
// Node.js and CommonJS
|
|
||||||
|
|
||||||
// "callback-return": [ "warn", [ "callback", "next" ]],
|
|
||||||
// "global-require": "error",
|
|
||||||
// "handle-callback-err": "warn",
|
|
||||||
// "no-mixed-requires": "warn",
|
|
||||||
// "no-new-require": "error",
|
|
||||||
|
|
||||||
// Use path.concat instead
|
|
||||||
|
|
||||||
// "no-path-concat": "error",
|
|
||||||
// "no-process-exit": "error",
|
|
||||||
// "no-restricted-modules": "off",
|
|
||||||
// "no-sync": "warn",
|
|
||||||
|
|
||||||
// ECMAScript 6 support
|
|
||||||
|
|
||||||
// "arrow-body-style": [ "error", "always" ],
|
|
||||||
// "arrow-parens": [ "error", "always" ],
|
|
||||||
// "arrow-spacing": [ "error", { "before": true, "after": true }],
|
|
||||||
// "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-this-before-super": "error",
|
|
||||||
// "no-var": "warn",
|
|
||||||
"object-shorthand": [ "warn" ]
|
|
||||||
// "prefer-arrow-callback": "warn",
|
|
||||||
// "prefer-spread": "warn",
|
|
||||||
// "prefer-template": "warn",
|
|
||||||
// "require-yield": "error",
|
|
||||||
|
|
||||||
// Stylistic - everything here is a warning because of style.
|
|
||||||
|
|
||||||
// "array-bracket-spacing": [ "warn", "always" ],
|
|
||||||
// "block-spacing": [ "warn", "always" ],
|
|
||||||
// "brace-style": [ "warn", "1tbs", { "allowSingleLine": false } ],
|
|
||||||
// "camelcase": "warn",
|
|
||||||
// "comma-spacing": [ "warn", { "before": false, "after": true } ],
|
|
||||||
// "comma-style": [ "warn", "last" ],
|
|
||||||
// "computed-property-spacing": [ "warn", "never" ],
|
|
||||||
// "consistent-this": [ "warn", "self" ],
|
|
||||||
// "eol-last": "warn",
|
|
||||||
// "func-names": "warn",
|
|
||||||
// "func-style": [ "warn", "declaration" ],
|
|
||||||
// "id-length": [ "warn", { "min": 2, "max": 32 } ],
|
|
||||||
// "indent": [ "warn", 4 ],
|
|
||||||
// "jsx-quotes": [ "warn", "prefer-double" ],
|
|
||||||
// "linebreak-style": [ "warn", "unix" ],
|
|
||||||
// "lines-around-comment": [ "warn", { "beforeBlockComment": true } ],
|
|
||||||
// "max-depth": [ "warn", 8 ],
|
|
||||||
// "max-len": [ "warn", 132 ],
|
|
||||||
// "max-nested-callbacks": [ "warn", 8 ],
|
|
||||||
// "max-params": [ "warn", 8 ],
|
|
||||||
// "new-cap": "warn",
|
|
||||||
// "new-parens": "warn",
|
|
||||||
// "no-array-constructor": "warn",
|
|
||||||
// "no-bitwise": "off",
|
|
||||||
// "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-nested-ternary": "warn",
|
|
||||||
// "no-new-object": "warn",
|
|
||||||
// "no-plusplus": "off",
|
|
||||||
// "no-spaced-func": "warn",
|
|
||||||
// "no-ternary": "off",
|
|
||||||
// "no-trailing-spaces": "warn",
|
|
||||||
// "no-underscore-dangle": "warn",
|
|
||||||
// "no-unneeded-ternary": "warn",
|
|
||||||
// "object-curly-spacing": [ "warn", "always" ],
|
|
||||||
// "one-var": "off",
|
|
||||||
// "operator-assignment": [ "warn", "never" ],
|
|
||||||
// "operator-linebreak": [ "warn", "after" ],
|
|
||||||
// "padded-blocks": [ "warn", "never" ],
|
|
||||||
// "quote-props": [ "warn", "consistent-as-needed" ],
|
|
||||||
// "quotes": [ "warn", "single" ],
|
|
||||||
// "require-jsdoc": [ "warn", {
|
|
||||||
// "require": {
|
|
||||||
// "FunctionDeclaration": true,
|
|
||||||
// "MethodDefinition": true,
|
|
||||||
// "ClassDeclaration": false
|
|
||||||
// }
|
|
||||||
// }],
|
|
||||||
// "semi-spacing": [ "warn", { "before": false, "after": true }],
|
|
||||||
// "semi": [ "error", "always" ],
|
|
||||||
// "sort-vars": "off",
|
|
||||||
// "space-after-keywords": [ "warn", "always" ],
|
|
||||||
// "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",
|
|
||||||
// "space-unary-ops": "error",
|
|
||||||
// "spaced-comment": [ "warn", "always" ],
|
|
||||||
// "wrap-regex": "warn"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,8 +2,6 @@ name: Test Deployment
|
|||||||
on:
|
on:
|
||||||
deployment_status:
|
deployment_status:
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2eTests:
|
e2eTests:
|
||||||
if:
|
if:
|
||||||
|
|||||||
@@ -6,20 +6,6 @@ on:
|
|||||||
- opened
|
- opened
|
||||||
- edited
|
- edited
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: write
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: read
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
closeEmptyIssuesAndTemplates:
|
closeEmptyIssuesAndTemplates:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -6,20 +6,6 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "themes/index.js"
|
- "themes/index.js"
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
checks: read
|
|
||||||
contents: write
|
|
||||||
deployments: read
|
|
||||||
issues: read
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: read
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generateThemeDoc:
|
generateThemeDoc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -2,20 +2,6 @@ name: "Pull Request Labeler"
|
|||||||
on:
|
on:
|
||||||
- pull_request_target
|
- pull_request_target
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: read
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: write
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
name: OSSF Scorecard analysis workflow
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analysis:
|
|
||||||
name: Scorecard analysis
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
# Needed if using Code scanning alerts
|
|
||||||
security-events: write
|
|
||||||
# Needed for GitHub OIDC token if publish_results is true
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout code"
|
|
||||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: "Run analysis"
|
|
||||||
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3
|
|
||||||
with:
|
|
||||||
results_file: results.sarif
|
|
||||||
results_format: sarif
|
|
||||||
publish_results: true
|
|
||||||
|
|
||||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
||||||
# format to the repository Actions tab.
|
|
||||||
- name: "Upload artifact"
|
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
||||||
with:
|
|
||||||
name: SARIF file
|
|
||||||
path: results.sarif
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
# required for Code scanning alerts
|
|
||||||
- name: "Upload SARIF results to code scanning"
|
|
||||||
uses: github/codeql-action/upload-sarif@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
|
|
||||||
with:
|
|
||||||
sarif_file: results.sarif
|
|
||||||
@@ -7,20 +7,6 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "themes/index.js"
|
- "themes/index.js"
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: read
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: write
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
previewTheme:
|
previewTheme:
|
||||||
name: Install & Preview
|
name: Install & Preview
|
||||||
|
|||||||
@@ -4,20 +4,6 @@ on:
|
|||||||
types:
|
types:
|
||||||
- closed
|
- closed
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: read
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: read
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cleanup:
|
cleanup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -3,20 +3,6 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 */7 * *"
|
- cron: "0 0 */7 * *"
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: read
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: write
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
closeOldThemePrs:
|
closeOldThemePrs:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -2,13 +2,11 @@ name: Test
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- "*"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Perform tests
|
name: Perform tests
|
||||||
@@ -31,10 +29,6 @@ jobs:
|
|||||||
npm ci
|
npm ci
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
- name: Run ESLint
|
|
||||||
run: |
|
|
||||||
npm run lint
|
|
||||||
|
|
||||||
- name: Run Prettier
|
- name: Run Prettier
|
||||||
run: |
|
run: |
|
||||||
npm run format:check
|
npm run format:check
|
||||||
|
|||||||
@@ -4,20 +4,6 @@ on:
|
|||||||
- cron: "0 0 */3 * *"
|
- cron: "0 0 */3 * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: write
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: write
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
showAndLabelTopIssues:
|
showAndLabelTopIssues:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -3,20 +3,6 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 */30 * *"
|
- cron: "0 0 */30 * *"
|
||||||
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: read
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pages: read
|
|
||||||
pull-requests: write
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
updateLanguages:
|
updateLanguages:
|
||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
|
|||||||
@@ -2,5 +2,4 @@
|
|||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
npm test
|
npm test
|
||||||
npm run lint
|
|
||||||
npx lint-staged
|
npx lint-staged
|
||||||
|
|||||||
+2
-5
@@ -47,17 +47,14 @@ _(make sure you already have a [Vercel](https://vercel.com/) account)_
|
|||||||
|
|
||||||
GitHub Readme Stats supports custom theming, and you can also contribute new themes!
|
GitHub Readme Stats supports custom theming, and you can also contribute new themes!
|
||||||
|
|
||||||
|
All you need to do is edit the [themes/index.js](./themes/index.js) file and add your theme at the end of the file.
|
||||||
|
|
||||||
> **Note**
|
> **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 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.
|
||||||
|
|
||||||
> **Note**
|
> **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 (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). Remember that you can also support themes of other contributors that you liked to speed up their merge.
|
> 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 (see [#1935](https://github.com/anuraghazra/github-readme-stats/issues/1935#top-themes-prs)). Remember that you can also support themes of other contributors that you liked to speed up their merge.
|
||||||
|
|
||||||
> **Note**
|
|
||||||
> Before submitting pull request, please make sure that your theme pass WCAG 2.0 level AA constrast ration test. You can use [this tool](https://webaim.org/resources/contrastchecker/) to check it.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
## Any contributions you make will be under the MIT Software License
|
## 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](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -8,11 +8,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -20,9 +17,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -8,11 +8,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -20,9 +17,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Testes aprovados" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Testes aprovados" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
+1
-7
@@ -7,11 +7,8 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/graphs/contributors">
|
|
||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
|
||||||
</a>
|
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +16,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
|
|||||||
Generated
+226
-1411
File diff suppressed because it is too large
Load Diff
+1
-4
@@ -29,8 +29,7 @@
|
|||||||
"generate-langs-json": "node scripts/generate-langs-json",
|
"generate-langs-json": "node scripts/generate-langs-json",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"format:check": "prettier --check .",
|
"format:check": "prettier --check .",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install"
|
||||||
"lint": "npx eslint --max-warnings 0 \"./src/**.js\" \"./scripts/**.js\" \"./tests/**.js\" \"./api/**.js\" \"./themes/**.js\""
|
|
||||||
},
|
},
|
||||||
"author": "Anurag Hazra",
|
"author": "Anurag Hazra",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -42,8 +41,6 @@
|
|||||||
"@uppercod/css-to-object": "^1.1.1",
|
"@uppercod/css-to-object": "^1.1.1",
|
||||||
"axios-mock-adapter": "^1.21.2",
|
"axios-mock-adapter": "^1.21.2",
|
||||||
"color-contrast-checker": "^2.1.0",
|
"color-contrast-checker": "^2.1.0",
|
||||||
"eslint": "^8.43.0",
|
|
||||||
"eslint-config-prettier": "^8.8.0",
|
|
||||||
"hjson": "^3.2.2",
|
"hjson": "^3.2.2",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/anuraghazra/github-readme-stats" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
<a href="https://codecov.io/gh/anuraghazra/github-readme-stats">
|
||||||
<img alt="Tests Coverage" src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
@@ -19,9 +19,6 @@
|
|||||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://securityscorecards.dev/viewer/?uri=github.com/anuraghazra/github-readme-stats">
|
|
||||||
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/anuraghazra/github-readme-stats/badge" />
|
|
||||||
</a>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
<a href="https://a.paddle.com/v2/click/16413/119403?link=1227">
|
||||||
@@ -68,8 +65,6 @@
|
|||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">Please note that documentation translations may be outdated, try to use english documentation if possible.</p>
|
|
||||||
|
|
||||||
<p align="center">Love the project? Please consider <a href="https://www.paypal.me/anuraghazra">donating</a> to help it improve!</p>
|
<p align="center">Love the project? Please consider <a href="https://www.paypal.me/anuraghazra">donating</a> to help it improve!</p>
|
||||||
|
|
||||||
<a href="https://indiafightscorona.giveindia.org">
|
<a href="https://indiafightscorona.giveindia.org">
|
||||||
@@ -80,7 +75,7 @@ Are you considering supporting the project by donating to me? Please DO NOT!!
|
|||||||
|
|
||||||
<img src="https://cfstatic.give.do/910ede2a-7892-43fe-8c8a-dea45e96d950.webp" alt="Picture of Coromandel Express train tragedy" width="35%">
|
<img src="https://cfstatic.give.do/910ede2a-7892-43fe-8c8a-dea45e96d950.webp" alt="Picture of Coromandel Express train tragedy" width="35%">
|
||||||
|
|
||||||
India just suffered one of the most devastating train accident and your help will be immensely valuable for the people who were affected by this tragedy.
|
India just suffered one of the most devastating train accident and your help will be immensely valuable for the people who were effected by this tragedy.
|
||||||
|
|
||||||
Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of-the-coromandel-express-train-tragedy-in-odisha-donate-now) and make a small donation to help the people in need. A small donation goes a long way. :heart:
|
Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of-the-coromandel-express-train-tragedy-in-odisha-donate-now) and make a small donation to help the people in need. A small donation goes a long way. :heart:
|
||||||
|
|
||||||
@@ -88,38 +83,38 @@ Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of
|
|||||||
|
|
||||||
# Features <!-- omit in toc -->
|
# Features <!-- omit in toc -->
|
||||||
|
|
||||||
* [GitHub Stats Card](#github-stats-card)
|
- [GitHub Stats Card](#github-stats-card)
|
||||||
* [Hiding individual stats](#hiding-individual-stats)
|
- [Hiding individual stats](#hiding-individual-stats)
|
||||||
* [Showing additional individual stats](#showing-additional-individual-stats)
|
- [Showing additional individual stats](#showing-additional-individual-stats)
|
||||||
* [Showing icons](#showing-icons)
|
- [Showing icons](#showing-icons)
|
||||||
* [Themes](#themes)
|
- [Themes](#themes)
|
||||||
* [Customization](#customization)
|
- [Customization](#customization)
|
||||||
* [GitHub Extra Pins](#github-extra-pins)
|
- [GitHub Extra Pins](#github-extra-pins)
|
||||||
* [Usage](#usage)
|
- [Usage](#usage)
|
||||||
* [Demo](#demo)
|
- [Demo](#demo)
|
||||||
* [Top Languages Card](#top-languages-card)
|
- [Top Languages Card](#top-languages-card)
|
||||||
* [Usage](#usage-1)
|
- [Usage](#usage-1)
|
||||||
* [Language stats algorithm](#language-stats-algorithm)
|
- [Language stats algorithm](#language-stats-algorithm)
|
||||||
* [Exclude individual repositories](#exclude-individual-repositories)
|
- [Exclude individual repositories](#exclude-individual-repositories)
|
||||||
* [Hide individual languages](#hide-individual-languages)
|
- [Hide individual languages](#hide-individual-languages)
|
||||||
* [Show more languages](#show-more-languages)
|
- [Show more languages](#show-more-languages)
|
||||||
* [Compact Language Card Layout](#compact-language-card-layout)
|
- [Compact Language Card Layout](#compact-language-card-layout)
|
||||||
* [Donut Chart Language Card Layout](#donut-chart-language-card-layout)
|
- [Donut Chart Language Card Layout](#donut-chart-language-card-layout)
|
||||||
* [Donut Vertical Chart Language Card Layout](#donut-vertical-chart-language-card-layout)
|
- [Donut Vertical Chart Language Card Layout](#donut-vertical-chart-language-card-layout)
|
||||||
* [Pie Chart Language Card Layout](#pie-chart-language-card-layout)
|
- [Pie Chart Language Card Layout](#pie-chart-language-card-layout)
|
||||||
* [Hide Progress Bars](#hide-progress-bars)
|
- [Hide Progress Bars](#hide-progress-bars)
|
||||||
* [Demo](#demo-1)
|
- [Demo](#demo-1)
|
||||||
* [Wakatime Stats Card](#wakatime-stats-card)
|
- [Wakatime Stats Card](#wakatime-stats-card)
|
||||||
* [Demo](#demo-2)
|
- [Demo](#demo-2)
|
||||||
* [All Demos](#all-demos)
|
- [All Demos](#all-demos)
|
||||||
* [Quick Tip (Align The Cards)](#quick-tip-align-the-cards)
|
- [Quick Tip (Align The Cards)](#quick-tip-align-the-cards)
|
||||||
* [Deploy on your own](#deploy-on-your-own)
|
- [Deploy on your own](#deploy-on-your-own)
|
||||||
* [On Vercel](#on-vercel)
|
- [On Vercel](#on-vercel)
|
||||||
* [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr)
|
- [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr)
|
||||||
* [On other platforms](#on-other-platforms)
|
- [On other platforms](#on-other-platforms)
|
||||||
* [Disable rate limit protections](#disable-rate-limit-protections)
|
- [Disable rate limit protections](#disable-rate-limit-protections)
|
||||||
* [Keep your fork up to date](#keep-your-fork-up-to-date)
|
- [Keep your fork up to date](#keep-your-fork-up-to-date)
|
||||||
* [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
|
- [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
|
||||||
|
|
||||||
# Important Notice <!-- omit in toc -->
|
# Important Notice <!-- omit in toc -->
|
||||||
|
|
||||||
@@ -182,11 +177,11 @@ Use `&theme=THEME_NAME` parameter like so :
|
|||||||
|
|
||||||
#### All inbuilt themes
|
#### All inbuilt themes
|
||||||
|
|
||||||
GitHub Readme Stats comes with several built-in themes (e.g. `dark`, `radical`, `merko`, `gruvbox`, `tokyonight`, `onedark`, `cobalt`, `synthwave`, `highcontrast`, `dracula`).
|
GitHub readme stats comes with several built-in themes (e.g. `dark`, `radical`, `merko`, `gruvbox`, `tokyonight`, `onedark`, `cobalt`, `synthwave`, `highcontrast`, `dracula`).
|
||||||
|
|
||||||
<img src="https://res.cloudinary.com/anuraghazra/image/upload/v1595174536/grs-themes_l4ynja.png" alt="GitHub Readme Stats Themes" width="600px"/>
|
<img src="https://res.cloudinary.com/anuraghazra/image/upload/v1595174536/grs-themes_l4ynja.png" alt="GitHub Readme Stats Themes" width="600px"/>
|
||||||
|
|
||||||
You can look at a preview for [all available themes](./themes/README.md) or checkout the [theme config file](./themes/index.js). You can also contribute new themes if you like, contributing guidelines can be found [here](./CONTRIBUTING.md#themes-contribution).
|
You can look at a preview for [all available themes](./themes/README.md) or checkout the [theme config file](./themes/index.js) & **you can also contribute new themes** if you like :D
|
||||||
|
|
||||||
#### Responsive Card Theme
|
#### Responsive Card Theme
|
||||||
|
|
||||||
@@ -289,9 +284,9 @@ You can customize the appearance of your `Stats Card` or `Repo Card` however you
|
|||||||
* `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (Does not apply when `hide_border` is enabled).
|
* `border_color` - Card's border color *(hex color)*. Default: `e4e2e2` (Does not apply when `hide_border` is enabled).
|
||||||
* `bg_color` - Card's background color *(hex color)* **or** a gradient in the form of *angle,start,end*. Default: `fffefe`
|
* `bg_color` - Card's background color *(hex color)* **or** a gradient in the form of *angle,start,end*. Default: `fffefe`
|
||||||
* `hide_border` - Hides the card's border *(boolean)*. Default: `false`
|
* `hide_border` - Hides the card's border *(boolean)*. Default: `false`
|
||||||
* `theme` - Name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme.
|
* `theme` - name of the theme, choose from [all available themes](./themes/README.md). Default: `default` theme.
|
||||||
* `cache_seconds` - Sets the cache header manually *(min: 14400, max: 86400)*. Default: `14400 seconds (4 hours)`.
|
* `cache_seconds` - set the cache header manually *(min: 14400, max: 86400)*. Default: `14400 seconds (4 hours)`.
|
||||||
* `locale` - Sets the language in the card *(e.g. cn, de, es, etc.)*. Default: `en`.
|
* `locale` - set the language in the card *(e.g. cn, de, es, etc.)*. Default: `en`.
|
||||||
* `border_radius` - Corner rounding on the card. Default: `4.5`.
|
* `border_radius` - Corner rounding on the card. Default: `4.5`.
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
@@ -307,38 +302,38 @@ You can provide multiple comma-separated values in the bg\_color option to rende
|
|||||||
|
|
||||||
* `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `hide` - Hides the [specified items](#hiding-individual-stats) from stats *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||||
* `hide_title` - *(boolean)*. Default: `false`.
|
* `hide_title` - *(boolean)*. Default: `false`.
|
||||||
* `card_width` - Sets the card's width manually *(number)*. Default: `500px (approx.)`.
|
* `card_width` - Set the card's width manually *(number)*. Default: `500px (approx.)`.
|
||||||
* `hide_rank` - *(boolean)* hides the rank and automatically resizes the card width. Default: `false`.
|
* `hide_rank` - *(boolean)* hides the rank and automatically resizes the card width. Default: `false`.
|
||||||
* `rank_icon` - Shows alternative rank icon (i.e. `github`, `percentile` or `default`). Default: `default`.
|
* `rank_icon` - Shows alternative rank icon (i.e. `github`, `percentile`, `progress` or `default`). Default: `default`.
|
||||||
* `show_icons` - *(boolean)*. Default: `false`.
|
* `show_icons` - *(boolean)*. Default: `false`.
|
||||||
* `include_all_commits` - Counts total commits instead of just the current year commits *(boolean)*. Default: `false`.
|
* `include_all_commits` - Count total commits instead of just the current year commits *(boolean)*. Default: `false`.
|
||||||
* `line_height` - Sets the line height between text *(number)*. Default: `25`.
|
* `line_height` - Sets the line height between text *(number)*. Default: `25`.
|
||||||
* `exclude_repo` - Excludes stars from specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `exclude_repo` - Exclude stars from specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||||
* `custom_title` - Sets a custom title for the card. Default: `<username> GitHub Stats`.
|
* `custom_title` - Sets a custom title for the card. Default: `<username> GitHub Stats`.
|
||||||
* `text_bold` - Uses bold text *(boolean)*. Default: `true`.
|
* `text_bold` - Use bold text *(boolean)*. Default: `true`.
|
||||||
* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
|
* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
|
||||||
* `ring_color` - Color of the rank circle *(hex color)*. Defaults to the theme ring color if it exists and otherwise the title color.
|
* `ring_color` - Color of the rank circle *(hex color)*. Defaults to the theme ring color if it exists and otherwise the title color.
|
||||||
* `number_format` - Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
|
* `number_format` - Switch between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
|
||||||
* `show` - Shows [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started` or `discussions_answered`) *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `show` - Show [additional items](#showing-additional-individual-stats) on stats card (i.e. `reviews`, `discussions_started` or `discussions_answered`) *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
> When hide\_rank=`true`, the minimum card width is 270 px + the title length and padding.
|
> When hide\_rank=`true`, the minimum card width is 270 px + the title length and padding.
|
||||||
|
|
||||||
#### Repo Card Exclusive Options
|
#### Repo Card Exclusive Options
|
||||||
|
|
||||||
* `show_owner` - Shows the repo's owner name *(boolean)*. Default: `false`.
|
* `show_owner` - Show the repo's owner name *(boolean)*. Default: `false`.
|
||||||
|
|
||||||
#### Language Card Exclusive Options
|
#### Language Card Exclusive Options
|
||||||
|
|
||||||
* `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `hide` - Hide the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||||
* `hide_title` - *(boolean)*. Default: `false`.
|
* `hide_title` - *(boolean)*. Default: `false`.
|
||||||
* `layout` - Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
|
* `layout` - Switch between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
|
||||||
* `card_width` - Sets the card's width manually *(number)*. Default `300`.
|
* `card_width` - Set the card's width manually *(number)*. Default `300`.
|
||||||
* `langs_count` - Shows more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts.
|
* `langs_count` - Show more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts.
|
||||||
* `exclude_repo` - Excludes specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `exclude_repo` - Exclude specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||||
* `custom_title` - Sets a custom title for the card *(string)*. Default `Most Used Languages`.
|
* `custom_title` - Sets a custom title for the card *(string)*. Default `Most Used Languages`.
|
||||||
* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
|
* `disable_animations` - Disables all animations in the card *(boolean)*. Default: `false`.
|
||||||
* `hide_progress` - Uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
|
* `hide_progress` - It uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
|
||||||
* `size_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1.
|
* `size_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 1.
|
||||||
* `count_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0.
|
* `count_weight` - Configures language stats algorithm *(number)* (see [Language stats algorithm](#Language-stats-algorithm)), defaults to 0.
|
||||||
|
|
||||||
@@ -349,20 +344,20 @@ You can provide multiple comma-separated values in the bg\_color option to rende
|
|||||||
|
|
||||||
#### Wakatime Card Exclusive Options
|
#### Wakatime Card Exclusive Options
|
||||||
|
|
||||||
* `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `hide` - Hide the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||||
* `hide_title` - *(boolean)*. Default `false`.
|
* `hide_title` - *(boolean)*. Default `false`.
|
||||||
* `line_height` - Sets the line height between text *(number)*. Default `25`.
|
* `line_height` - Sets the line height between text *(number)*. Default `25`.
|
||||||
* `hide_progress` - Hides the progress bar and percentage *(boolean)*. Default `false`.
|
* `hide_progress` - Hides the progress bar and percentage *(boolean)*. Default `false`.
|
||||||
* `custom_title` - Sets a custom title for the card *(string)*. Default `Wakatime Stats`.
|
* `custom_title` - Sets a custom title for the card *(string)*. Default `Wakatime Stats`.
|
||||||
* `layout` - Switches between two available layouts `default` & `compact`. Default `default`.
|
* `layout` - Switch between two available layouts `default` & `compact`. Default `default`.
|
||||||
* `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*.
|
* `langs_count` - Limit the number of languages on the card, defaults to all reported languages *(number)*.
|
||||||
* `api_domain` - Sets a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) *(string)*. Default `Waka API`.
|
* `api_domain` - Set a custom API domain for the card, e.g. to use services like [Hakatime](https://github.com/mujx/hakatime) or [Wakapi](https://github.com/muety/wakapi) *(string)*. Default `Waka API`.
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
# GitHub Extra Pins
|
# GitHub Extra Pins
|
||||||
|
|
||||||
GitHub extra pins allow you to pin more than 6 repositories in your profile using a GitHub readme profile.
|
GitHub extra pins allow you to pin more than six repositories in your profile using a GitHub readme profile.
|
||||||
|
|
||||||
Yay! You are no longer limited to 6 pinned repositories.
|
Yay! You are no longer limited to 6 pinned repositories.
|
||||||
|
|
||||||
@@ -386,7 +381,7 @@ Use [show\_owner](#repo-card-exclusive-options) query option to include the repo
|
|||||||
|
|
||||||
# Top Languages Card
|
# Top Languages Card
|
||||||
|
|
||||||
The top languages card shows a GitHub user's most frequently used languages.
|
The top languages card shows a GitHub user's most frequently used top language.
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
> By default, the language card shows language results only from public repositories. To include languages used in private repositories, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token.
|
> By default, the language card shows language results only from public repositories. To include languages used in private repositories, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token.
|
||||||
@@ -558,6 +553,10 @@ Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
* Shows rank progress instead of rank level
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
* Shows user rank percentile instead of rank level
|
* Shows user rank percentile instead of rank level
|
||||||
|
|
||||||

|

|
||||||
@@ -732,5 +731,3 @@ Thanks! :heart:
|
|||||||
Contributions are welcome! <3
|
Contributions are welcome! <3
|
||||||
|
|
||||||
Made with :heart: and JavaScript.
|
Made with :heart: and JavaScript.
|
||||||
|
|
||||||
test2
|
|
||||||
|
|||||||
@@ -25,12 +25,10 @@ const getReviewer = () => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch open PRs from a given repository.
|
* Fetch open PRs from a given repository.
|
||||||
*
|
* @param user The user name of the repository owner.
|
||||||
* @param {module:@actions/github.Octokit} octokit The octokit client.
|
* @param repo The name of the repository.
|
||||||
* @param {string} user The user name of the repository owner.
|
* @param reviewer The reviewer to filter by.
|
||||||
* @param {string} repo The name of the repository.
|
* @returns The open PRs.
|
||||||
* @param {string} reviewer The reviewer to filter by.
|
|
||||||
* @returns {Promise<Object[]>} The open PRs.
|
|
||||||
*/
|
*/
|
||||||
export const fetchOpenPRs = async (octokit, user, repo, reviewer) => {
|
export const fetchOpenPRs = async (octokit, user, repo, reviewer) => {
|
||||||
const openPRs = [];
|
const openPRs = [];
|
||||||
@@ -90,10 +88,8 @@ export const fetchOpenPRs = async (octokit, user, repo, reviewer) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve pull requests that have a given label.
|
* Retrieve pull requests that have a given label.
|
||||||
*
|
* @param pull The pull requests to check.
|
||||||
* @param {Object[]} pulls The pull requests to check.
|
* @param label The label to check for.
|
||||||
* @param {string} label The label to check for.
|
|
||||||
* @returns {Object[]} The pull requests that have the given label.
|
|
||||||
*/
|
*/
|
||||||
export const pullsWithLabel = (pulls, label) => {
|
export const pullsWithLabel = (pulls, label) => {
|
||||||
return pulls.filter((pr) => {
|
return pulls.filter((pr) => {
|
||||||
@@ -103,10 +99,9 @@ export const pullsWithLabel = (pulls, label) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if PR is stale. Meaning that it hasn't been updated in a given time.
|
* Check if PR is stale. Meaning that it hasn't been updated in a given time.
|
||||||
*
|
|
||||||
* @param {Object} pullRequest request object.
|
* @param {Object} pullRequest request object.
|
||||||
* @param {number} staleDays number of days.
|
* @param {number} days number of days.
|
||||||
* @returns {boolean} indicating if PR is stale.
|
* @returns Boolean indicating if PR is stale.
|
||||||
*/
|
*/
|
||||||
const isStale = (pullRequest, staleDays) => {
|
const isStale = (pullRequest, staleDays) => {
|
||||||
const lastCommitDate = new Date(
|
const lastCommitDate = new Date(
|
||||||
@@ -127,8 +122,6 @@ const isStale = (pullRequest, staleDays) => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function.
|
* Main function.
|
||||||
*
|
|
||||||
* @returns {Promise<void>} A promise.
|
|
||||||
*/
|
*/
|
||||||
const run = async () => {
|
const run = async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ const REPO = "github-readme-stats";
|
|||||||
/**
|
/**
|
||||||
* Retrieve information about the repository that ran the action.
|
* Retrieve information about the repository that ran the action.
|
||||||
*
|
*
|
||||||
* @param {Object} ctx Action context.
|
* @param {Object} context Action context.
|
||||||
* @returns {Object} Repository information.
|
* @returns {Object} Repository information.
|
||||||
*/
|
*/
|
||||||
export const getRepoInfo = (ctx) => {
|
export const getRepoInfo = (ctx) => {
|
||||||
|
|||||||
@@ -110,9 +110,8 @@ const isPreviewComment = (inputs, comment) => {
|
|||||||
*
|
*
|
||||||
* @param {Object} octokit Octokit instance.
|
* @param {Object} octokit Octokit instance.
|
||||||
* @param {number} issueNumber Issue number.
|
* @param {number} issueNumber Issue number.
|
||||||
* @param {string} owner Owner of the repository.
|
|
||||||
* @param {string} repo Repository name.
|
* @param {string} repo Repository name.
|
||||||
* @param {string} commenter Comment author.
|
* @param {string} owner Owner of the repository.
|
||||||
* @returns {Object} The GitHub comment object.
|
* @returns {Object} The GitHub comment object.
|
||||||
*/
|
*/
|
||||||
const findComment = async (octokit, issueNumber, owner, repo, commenter) => {
|
const findComment = async (octokit, issueNumber, owner, repo, commenter) => {
|
||||||
@@ -152,7 +151,7 @@ const findComment = async (octokit, issueNumber, owner, repo, commenter) => {
|
|||||||
* @param {Object} owner Owner of the repository.
|
* @param {Object} owner Owner of the repository.
|
||||||
* @param {number} commentId Comment ID.
|
* @param {number} commentId Comment ID.
|
||||||
* @param {string} body Comment body.
|
* @param {string} body Comment body.
|
||||||
* @returns {string} The comment URL.
|
* @return {string} The comment URL.
|
||||||
*/
|
*/
|
||||||
const upsertComment = async (
|
const upsertComment = async (
|
||||||
octokit,
|
octokit,
|
||||||
@@ -190,7 +189,6 @@ const upsertComment = async (
|
|||||||
* @param {string} repo Repository name.
|
* @param {string} repo Repository name.
|
||||||
* @param {string} reviewState The review state. Options are (APPROVE, REQUEST_CHANGES, COMMENT, PENDING).
|
* @param {string} reviewState The review state. Options are (APPROVE, REQUEST_CHANGES, COMMENT, PENDING).
|
||||||
* @param {string} reason The reason for the review.
|
* @param {string} reason The reason for the review.
|
||||||
* @returns {Promise<void>} Promise.
|
|
||||||
*/
|
*/
|
||||||
const addReview = async (
|
const addReview = async (
|
||||||
octokit,
|
octokit,
|
||||||
@@ -217,7 +215,6 @@ const addReview = async (
|
|||||||
* @param {string} owner Repository owner.
|
* @param {string} owner Repository owner.
|
||||||
* @param {string} repo Repository name.
|
* @param {string} repo Repository name.
|
||||||
* @param {string[]} labels Labels to add.
|
* @param {string[]} labels Labels to add.
|
||||||
* @returns {Promise<void>} Promise.
|
|
||||||
*/
|
*/
|
||||||
const addLabel = async (octokit, prNumber, owner, repo, labels) => {
|
const addLabel = async (octokit, prNumber, owner, repo, labels) => {
|
||||||
await octokit.issues.addLabels({
|
await octokit.issues.addLabels({
|
||||||
@@ -236,7 +233,6 @@ const addLabel = async (octokit, prNumber, owner, repo, labels) => {
|
|||||||
* @param {string} owner Repository owner.
|
* @param {string} owner Repository owner.
|
||||||
* @param {string} repo Repository name.
|
* @param {string} repo Repository name.
|
||||||
* @param {string} label Label to add or remove.
|
* @param {string} label Label to add or remove.
|
||||||
* @returns {Promise<void>} Promise.
|
|
||||||
*/
|
*/
|
||||||
const removeLabel = async (octokit, prNumber, owner, repo, label) => {
|
const removeLabel = async (octokit, prNumber, owner, repo, label) => {
|
||||||
await octokit.issues.removeLabel({
|
await octokit.issues.removeLabel({
|
||||||
@@ -256,7 +252,6 @@ const removeLabel = async (octokit, prNumber, owner, repo, label) => {
|
|||||||
* @param {string} repo Repository name.
|
* @param {string} repo Repository name.
|
||||||
* @param {string} label Label to add or remove.
|
* @param {string} label Label to add or remove.
|
||||||
* @param {boolean} add Whether to add or remove the label.
|
* @param {boolean} add Whether to add or remove the label.
|
||||||
* @returns {Promise<void>} Promise.
|
|
||||||
*/
|
*/
|
||||||
const addRemoveLabel = async (octokit, prNumber, owner, repo, label, add) => {
|
const addRemoveLabel = async (octokit, prNumber, owner, repo, label, add) => {
|
||||||
const res = await octokit.pulls.get({
|
const res = await octokit.pulls.get({
|
||||||
@@ -364,8 +359,6 @@ const DRY_RUN = process.env.DRY_RUN === "true" || false;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function.
|
* Main function.
|
||||||
*
|
|
||||||
* @returns {Promise<void>} Promise.
|
|
||||||
*/
|
*/
|
||||||
export const run = async () => {
|
export const run = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -458,7 +451,7 @@ export const run = async () => {
|
|||||||
debug("Theme preview body: Check if the theme colors are valid...");
|
debug("Theme preview body: Check if the theme colors are valid...");
|
||||||
let invalidColors = false;
|
let invalidColors = false;
|
||||||
if (!colors) {
|
if (!colors) {
|
||||||
warnings.push("Theme colors are missing");
|
warning.push("Theme colors are missing");
|
||||||
invalidColors = true;
|
invalidColors = true;
|
||||||
} else {
|
} else {
|
||||||
const missingKeys = REQUIRED_COLOR_PROPS.filter(
|
const missingKeys = REQUIRED_COLOR_PROPS.filter(
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ function calculateRank({
|
|||||||
commits,
|
commits,
|
||||||
prs,
|
prs,
|
||||||
issues,
|
issues,
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
repos, // unused
|
repos, // unused
|
||||||
stars,
|
stars,
|
||||||
followers,
|
followers,
|
||||||
@@ -62,7 +61,7 @@ function calculateRank({
|
|||||||
|
|
||||||
const level = LEVELS[THRESHOLDS.findIndex((t) => rank * 100 <= t)];
|
const level = LEVELS[THRESHOLDS.findIndex((t) => rank * 100 <= t)];
|
||||||
|
|
||||||
return { level, percentile: rank * 100 };
|
return { level: level, percentile: rank * 100 };
|
||||||
}
|
}
|
||||||
|
|
||||||
export { calculateRank };
|
export { calculateRank };
|
||||||
|
|||||||
+14
-42
@@ -3,7 +3,6 @@ import { Card } from "../common/Card.js";
|
|||||||
import { I18n } from "../common/I18n.js";
|
import { I18n } from "../common/I18n.js";
|
||||||
import { icons, rankIcon } from "../common/icons.js";
|
import { icons, rankIcon } from "../common/icons.js";
|
||||||
import {
|
import {
|
||||||
CustomError,
|
|
||||||
clampValue,
|
clampValue,
|
||||||
flexLayout,
|
flexLayout,
|
||||||
getCardColors,
|
getCardColors,
|
||||||
@@ -17,8 +16,6 @@ const CARD_MIN_WIDTH = 287;
|
|||||||
const CARD_DEFAULT_WIDTH = 287;
|
const CARD_DEFAULT_WIDTH = 287;
|
||||||
const RANK_CARD_MIN_WIDTH = 420;
|
const RANK_CARD_MIN_WIDTH = 420;
|
||||||
const RANK_CARD_DEFAULT_WIDTH = 450;
|
const RANK_CARD_DEFAULT_WIDTH = 450;
|
||||||
const RANK_ONLY_CARD_MIN_WIDTH = 290;
|
|
||||||
const RANK_ONLY_CARD_DEFAULT_WIDTH = 290;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a stats card text item.
|
* Create a stats card text item.
|
||||||
@@ -33,7 +30,7 @@ const RANK_ONLY_CARD_DEFAULT_WIDTH = 290;
|
|||||||
* @param {number} createTextNodeParams.shiftValuePos Number of pixels the value has to be shifted to the right.
|
* @param {number} createTextNodeParams.shiftValuePos Number of pixels the value has to be shifted to the right.
|
||||||
* @param {boolean} createTextNodeParams.bold Whether to bold the label.
|
* @param {boolean} createTextNodeParams.bold Whether to bold the label.
|
||||||
* @param {string} createTextNodeParams.number_format The format of numbers on card.
|
* @param {string} createTextNodeParams.number_format The format of numbers on card.
|
||||||
* @returns {string} The stats card text item SVG object.
|
* @returns
|
||||||
*/
|
*/
|
||||||
const createTextNode = ({
|
const createTextNode = ({
|
||||||
icon,
|
icon,
|
||||||
@@ -77,11 +74,11 @@ const createTextNode = ({
|
|||||||
/**
|
/**
|
||||||
* Renders the stats card.
|
* Renders the stats card.
|
||||||
*
|
*
|
||||||
* @param {import('../fetchers/types').StatsData} stats The stats data.
|
* @param {Partial<import('../fetchers/types').StatsData>} stats The stats data.
|
||||||
* @param {Partial<import("./types").StatCardOptions>} options The card options.
|
* @param {Partial<import("./types").StatCardOptions>} options The card options.
|
||||||
* @returns {string} The stats card SVG object.
|
* @returns {string} The stats card SVG object.
|
||||||
*/
|
*/
|
||||||
const renderStatsCard = (stats, options = {}) => {
|
const renderStatsCard = (stats = {}, options = {}) => {
|
||||||
const {
|
const {
|
||||||
name,
|
name,
|
||||||
totalStars,
|
totalStars,
|
||||||
@@ -237,18 +234,11 @@ const renderStatsCard = (stats, options = {}) => {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (statItems.length === 0 && hide_rank) {
|
|
||||||
throw new CustomError(
|
|
||||||
"Could not render stats card.",
|
|
||||||
"Either stats or rank are required.",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calculate the card height depending on how many items there are
|
// Calculate the card height depending on how many items there are
|
||||||
// but if rank circle is visible clamp the minimum height to `150`
|
// but if rank circle is visible clamp the minimum height to `150`
|
||||||
let height = Math.max(
|
let height = Math.max(
|
||||||
45 + (statItems.length + 1) * lheight,
|
45 + (statItems.length + 1) * lheight,
|
||||||
hide_rank ? 0 : statItems.length ? 150 : 180,
|
hide_rank ? 0 : 150,
|
||||||
);
|
);
|
||||||
|
|
||||||
// the lower the user's percentile the better
|
// the lower the user's percentile the better
|
||||||
@@ -263,13 +253,7 @@ const renderStatsCard = (stats, options = {}) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const calculateTextWidth = () => {
|
const calculateTextWidth = () => {
|
||||||
return measureText(
|
return measureText(custom_title ? custom_title : i18n.t("statcard.title"));
|
||||||
custom_title
|
|
||||||
? custom_title
|
|
||||||
: statItems.length
|
|
||||||
? i18n.t("statcard.title")
|
|
||||||
: i18n.t("statcard.ranktitle"),
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -277,7 +261,7 @@ const renderStatsCard = (stats, options = {}) => {
|
|||||||
When hide_rank=false, the minimum card_width is 340 px + the icon width (if show_icons=true).
|
When hide_rank=false, the minimum card_width is 340 px + the icon width (if show_icons=true).
|
||||||
Numbers are picked by looking at existing dimensions on production.
|
Numbers are picked by looking at existing dimensions on production.
|
||||||
*/
|
*/
|
||||||
const iconWidth = show_icons && statItems.length ? 16 + /* padding */ 1 : 0;
|
const iconWidth = show_icons ? 16 + /* padding */ 1 : 0;
|
||||||
const minCardWidth =
|
const minCardWidth =
|
||||||
(hide_rank
|
(hide_rank
|
||||||
? clampValue(
|
? clampValue(
|
||||||
@@ -285,15 +269,9 @@ const renderStatsCard = (stats, options = {}) => {
|
|||||||
CARD_MIN_WIDTH,
|
CARD_MIN_WIDTH,
|
||||||
Infinity,
|
Infinity,
|
||||||
)
|
)
|
||||||
: statItems.length
|
: RANK_CARD_MIN_WIDTH) + iconWidth;
|
||||||
? RANK_CARD_MIN_WIDTH
|
|
||||||
: RANK_ONLY_CARD_MIN_WIDTH) + iconWidth;
|
|
||||||
const defaultCardWidth =
|
const defaultCardWidth =
|
||||||
(hide_rank
|
(hide_rank ? CARD_DEFAULT_WIDTH : RANK_CARD_DEFAULT_WIDTH) + iconWidth;
|
||||||
? CARD_DEFAULT_WIDTH
|
|
||||||
: statItems.length
|
|
||||||
? RANK_CARD_DEFAULT_WIDTH
|
|
||||||
: RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth;
|
|
||||||
let width = isNaN(card_width) ? defaultCardWidth : card_width;
|
let width = isNaN(card_width) ? defaultCardWidth : card_width;
|
||||||
if (width < minCardWidth) {
|
if (width < minCardWidth) {
|
||||||
width = minCardWidth;
|
width = minCardWidth;
|
||||||
@@ -301,9 +279,7 @@ const renderStatsCard = (stats, options = {}) => {
|
|||||||
|
|
||||||
const card = new Card({
|
const card = new Card({
|
||||||
customTitle: custom_title,
|
customTitle: custom_title,
|
||||||
defaultTitle: statItems.length
|
defaultTitle: i18n.t("statcard.title"),
|
||||||
? i18n.t("statcard.title")
|
|
||||||
: i18n.t("statcard.ranktitle"),
|
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
border_radius,
|
border_radius,
|
||||||
@@ -333,16 +309,12 @@ const renderStatsCard = (stats, options = {}) => {
|
|||||||
* @returns {number} - Rank circle translation value.
|
* @returns {number} - Rank circle translation value.
|
||||||
*/
|
*/
|
||||||
const calculateRankXTranslation = () => {
|
const calculateRankXTranslation = () => {
|
||||||
if (statItems.length) {
|
const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70;
|
||||||
const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70;
|
if (width > RANK_CARD_DEFAULT_WIDTH) {
|
||||||
if (width > RANK_CARD_DEFAULT_WIDTH) {
|
const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2;
|
||||||
const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2;
|
return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH;
|
||||||
return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH;
|
|
||||||
} else {
|
|
||||||
return minXTranslation + (width - minCardWidth) / 2;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return width / 2 + 20 - 10;
|
return minXTranslation + (width - minCardWidth) / 2;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ const DONUT_VERTICAL_LAYOUT_DEFAULT_LANGS_COUNT = 6;
|
|||||||
* Retrieves the programming language whose name is the longest.
|
* Retrieves the programming language whose name is the longest.
|
||||||
*
|
*
|
||||||
* @param {Lang[]} arr Array of programming languages.
|
* @param {Lang[]} arr Array of programming languages.
|
||||||
* @returns {{ name: string, size: number, color: string }} Longest programming language object.
|
* @returns {Object} Longest programming language object.
|
||||||
*/
|
*/
|
||||||
const getLongestLang = (arr) =>
|
const getLongestLang = (arr) =>
|
||||||
arr.reduce(
|
arr.reduce(
|
||||||
(savedLang, lang) =>
|
(savedLang, lang) =>
|
||||||
lang.name.length > savedLang.name.length ? lang : savedLang,
|
lang.name.length > savedLang.name.length ? lang : savedLang,
|
||||||
{ name: "", size: 0, color: "" },
|
{ name: "", size: null, color: "" },
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -392,7 +392,7 @@ const renderCompactLayout = (langs, width, totalLanguageSize, hideProgress) => {
|
|||||||
${createLanguageTextNode({
|
${createLanguageTextNode({
|
||||||
langs,
|
langs,
|
||||||
totalSize: totalLanguageSize,
|
totalSize: totalLanguageSize,
|
||||||
hideProgress,
|
hideProgress: hideProgress,
|
||||||
})}
|
})}
|
||||||
</g>
|
</g>
|
||||||
`;
|
`;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
type ThemeNames = keyof typeof import("../../themes/index.js");
|
type ThemeNames = keyof typeof import("../../themes/index.js");
|
||||||
type RankIcon = "default" | "github" | "percentile";
|
type RankIcon = "default" | "github" | "percentile" | "progress";
|
||||||
|
|
||||||
export type CommonOptions = {
|
export type CommonOptions = {
|
||||||
title_color: string;
|
title_color: string;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const languageColors = require("../common/languageColors.json"); // now works
|
|||||||
* @param {object} props The function properties.
|
* @param {object} props The function properties.
|
||||||
* @param {string} props.color No coding activity text color.
|
* @param {string} props.color No coding activity text color.
|
||||||
* @param {string} props.text No coding activity translated text.
|
* @param {string} props.text No coding activity translated text.
|
||||||
* @returns {string} No coding activity SVG node string.
|
* @return {string} No coding activity SVG node string.
|
||||||
*/
|
*/
|
||||||
const noCodingActivityNode = ({ color, text }) => {
|
const noCodingActivityNode = ({ color, text }) => {
|
||||||
return `
|
return `
|
||||||
@@ -41,10 +41,11 @@ const noCodingActivityNode = ({ color, text }) => {
|
|||||||
*
|
*
|
||||||
* @param {Object} args The function arguments.
|
* @param {Object} args The function arguments.
|
||||||
* @param {import("../fetchers/types").WakaTimeLang} args.lang The languages array.
|
* @param {import("../fetchers/types").WakaTimeLang} args.lang The languages array.
|
||||||
|
* @param {number} args.totalSize The total size of the languages.
|
||||||
* @param {number} args.x The x position of the language node.
|
* @param {number} args.x The x position of the language node.
|
||||||
* @param {number} args.y The y position of the language node.
|
* @param {number} args.y The y position of the language node.
|
||||||
*/
|
*/
|
||||||
const createCompactLangNode = ({ lang, x, y }) => {
|
const createCompactLangNode = ({ lang, totalSize, x, y }) => {
|
||||||
const color = languageColors[lang.name] || "#858585";
|
const color = languageColors[lang.name] || "#858585";
|
||||||
|
|
||||||
return `
|
return `
|
||||||
@@ -62,21 +63,25 @@ const createCompactLangNode = ({ lang, x, y }) => {
|
|||||||
*
|
*
|
||||||
* @param {Object} args The function arguments.
|
* @param {Object} args The function arguments.
|
||||||
* @param {import("../fetchers/types").WakaTimeLang[]} args.langs The language objects.
|
* @param {import("../fetchers/types").WakaTimeLang[]} args.langs The language objects.
|
||||||
|
* @param {number} args.totalSize The total size of the languages.
|
||||||
|
* @param {number} args.x The x position of the language node.
|
||||||
* @param {number} args.y The y position of the language node.
|
* @param {number} args.y The y position of the language node.
|
||||||
*/
|
*/
|
||||||
const createLanguageTextNode = ({ langs, y }) => {
|
const createLanguageTextNode = ({ langs, totalSize, x, y }) => {
|
||||||
return langs.map((lang, index) => {
|
return langs.map((lang, index) => {
|
||||||
if (index % 2 === 0) {
|
if (index % 2 === 0) {
|
||||||
return createCompactLangNode({
|
return createCompactLangNode({
|
||||||
lang,
|
lang,
|
||||||
x: 25,
|
x: 25,
|
||||||
y: 12.5 * index + y,
|
y: 12.5 * index + y,
|
||||||
|
totalSize,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return createCompactLangNode({
|
return createCompactLangNode({
|
||||||
lang,
|
lang,
|
||||||
x: 230,
|
x: 230,
|
||||||
y: 12.5 + 12.5 * index,
|
y: 12.5 + 12.5 * index,
|
||||||
|
totalSize,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -138,7 +143,7 @@ const createTextNode = ({
|
|||||||
* hiding languages.
|
* hiding languages.
|
||||||
*
|
*
|
||||||
* @param {import("../fetchers/types").WakaTimeLang[]} languages The languages array.
|
* @param {import("../fetchers/types").WakaTimeLang[]} languages The languages array.
|
||||||
* @returns {void} The recalculated languages array.
|
* @return {void} The recalculated languages array.
|
||||||
*/
|
*/
|
||||||
const recalculatePercentages = (languages) => {
|
const recalculatePercentages = (languages) => {
|
||||||
const totalSum = languages.reduce(
|
const totalSum = languages.reduce(
|
||||||
@@ -269,8 +274,10 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
${
|
${
|
||||||
filteredLanguages.length
|
filteredLanguages.length
|
||||||
? createLanguageTextNode({
|
? createLanguageTextNode({
|
||||||
|
x: 0,
|
||||||
y: 25,
|
y: 25,
|
||||||
langs: filteredLanguages,
|
langs: filteredLanguages,
|
||||||
|
totalSize: 100,
|
||||||
}).join("")
|
}).join("")
|
||||||
: noCodingActivityNode({
|
: noCodingActivityNode({
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@@ -291,7 +298,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
|||||||
id: language.name,
|
id: language.name,
|
||||||
label: language.name,
|
label: language.name,
|
||||||
value: language.text,
|
value: language.text,
|
||||||
index,
|
index: index,
|
||||||
percent: language.percent,
|
percent: language.percent,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
progressBarColor: titleColor,
|
progressBarColor: titleColor,
|
||||||
|
|||||||
+6
-23
@@ -54,18 +54,12 @@ class Card {
|
|||||||
this.a11yDesc = "";
|
this.a11yDesc = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
|
||||||
disableAnimations() {
|
disableAnimations() {
|
||||||
this.animations = false;
|
this.animations = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} props The props object.
|
* @param {{title: string, desc: string}} prop
|
||||||
* @param {string} props.title Accessibility title.
|
|
||||||
* @param {string} props.desc Accessibility description.
|
|
||||||
* @returns {void}
|
|
||||||
*/
|
*/
|
||||||
setAccessibilityLabel({ title, desc }) {
|
setAccessibilityLabel({ title, desc }) {
|
||||||
this.a11yTitle = title;
|
this.a11yTitle = title;
|
||||||
@@ -73,24 +67,21 @@ class Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} value The CSS to add to the card.
|
* @param {string} value
|
||||||
* @returns {void}
|
|
||||||
*/
|
*/
|
||||||
setCSS(value) {
|
setCSS(value) {
|
||||||
this.css = value;
|
this.css = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {boolean} value Whether to hide the border or not.
|
* @param {boolean} value
|
||||||
* @returns {void}
|
|
||||||
*/
|
*/
|
||||||
setHideBorder(value) {
|
setHideBorder(value) {
|
||||||
this.hideBorder = value;
|
this.hideBorder = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {boolean} value Whether to hide the title or not.
|
* @param {boolean} value
|
||||||
* @returns {void}
|
|
||||||
*/
|
*/
|
||||||
setHideTitle(value) {
|
setHideTitle(value) {
|
||||||
this.hideTitle = value;
|
this.hideTitle = value;
|
||||||
@@ -100,16 +91,12 @@ class Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} text The title to set.
|
* @param {string} text
|
||||||
* @returns {void}
|
|
||||||
*/
|
*/
|
||||||
setTitle(text) {
|
setTitle(text) {
|
||||||
this.title = text;
|
this.title = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {string} The rendered card title.
|
|
||||||
*/
|
|
||||||
renderTitle() {
|
renderTitle() {
|
||||||
const titleText = `
|
const titleText = `
|
||||||
<text
|
<text
|
||||||
@@ -146,9 +133,6 @@ class Card {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {string} The rendered card gradient.
|
|
||||||
*/
|
|
||||||
renderGradient() {
|
renderGradient() {
|
||||||
if (typeof this.colors.bgColor !== "object") return "";
|
if (typeof this.colors.bgColor !== "object") return "";
|
||||||
|
|
||||||
@@ -172,8 +156,7 @@ class Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} body The inner body of the card.
|
* @param {string} body
|
||||||
* @returns {string} The rendered card.
|
|
||||||
*/
|
*/
|
||||||
render(body) {
|
render(body) {
|
||||||
return `
|
return `
|
||||||
|
|||||||
+7
-1
@@ -36,13 +36,19 @@ const rankIcon = (rankIcon, rankLevel, percentile) => {
|
|||||||
${percentile.toFixed(1)}%
|
${percentile.toFixed(1)}%
|
||||||
</text>
|
</text>
|
||||||
`;
|
`;
|
||||||
|
case "progress":
|
||||||
|
return `
|
||||||
|
<text x="-5" y="3" alignment-baseline="central" dominant-baseline="central" text-anchor="middle" data-testid="progress-rank-icon" class="rank-percentile-text">
|
||||||
|
${(100.0 - percentile).toFixed(1)}%
|
||||||
|
</text>
|
||||||
|
`;
|
||||||
case "default":
|
case "default":
|
||||||
default:
|
default:
|
||||||
return `
|
return `
|
||||||
<text x="-5" y="3" alignment-baseline="central" dominant-baseline="central" text-anchor="middle" data-testid="level-rank-icon">
|
<text x="-5" y="3" alignment-baseline="central" dominant-baseline="central" text-anchor="middle" data-testid="level-rank-icon">
|
||||||
${rankLevel}
|
${rankLevel}
|
||||||
</text>
|
</text>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,6 @@
|
|||||||
"Haxe": "#df7900",
|
"Haxe": "#df7900",
|
||||||
"HiveQL": "#dce200",
|
"HiveQL": "#dce200",
|
||||||
"HolyC": "#ffefaf",
|
"HolyC": "#ffefaf",
|
||||||
"Hosts File": "#308888",
|
|
||||||
"Hy": "#7790B2",
|
"Hy": "#7790B2",
|
||||||
"IDL": "#a3522f",
|
"IDL": "#a3522f",
|
||||||
"IGOR Pro": "#0000cc",
|
"IGOR Pro": "#0000cc",
|
||||||
@@ -518,8 +517,6 @@
|
|||||||
"Volt": "#1F1F1F",
|
"Volt": "#1F1F1F",
|
||||||
"Vue": "#41b883",
|
"Vue": "#41b883",
|
||||||
"Vyper": "#2980b9",
|
"Vyper": "#2980b9",
|
||||||
"WDL": "#42f1f4",
|
|
||||||
"WGSL": "#1a5e9a",
|
|
||||||
"Web Ontology Language": "#5b70bd",
|
"Web Ontology Language": "#5b70bd",
|
||||||
"WebAssembly": "#04133b",
|
"WebAssembly": "#04133b",
|
||||||
"WebAssembly Interface Type": "#6250e7",
|
"WebAssembly Interface Type": "#6250e7",
|
||||||
@@ -564,6 +561,7 @@
|
|||||||
"q": "#0040cd",
|
"q": "#0040cd",
|
||||||
"reStructuredText": "#141414",
|
"reStructuredText": "#141414",
|
||||||
"sed": "#64b970",
|
"sed": "#64b970",
|
||||||
|
"wdl": "#42f1f4",
|
||||||
"wisp": "#7582D1",
|
"wisp": "#7582D1",
|
||||||
"xBase": "#403a40"
|
"xBase": "#403a40"
|
||||||
}
|
}
|
||||||
@@ -9,10 +9,11 @@ const RETRIES = PATs ? PATs : 7;
|
|||||||
/**
|
/**
|
||||||
* Try to execute the fetcher function until it succeeds or the max number of retries is reached.
|
* Try to execute the fetcher function until it succeeds or the max number of retries is reached.
|
||||||
*
|
*
|
||||||
* @param {object[]} fetcher The fetcher function.
|
* @param {object[]} retryerParams Object that contains the createTextNode parameters.
|
||||||
* @param {object[]} variables Object with arguments to pass to the fetcher function.
|
* @param {object[]} retryerParams.fetcher The fetcher function.
|
||||||
* @param {number} retries How many times to retry.
|
* @param {object[]} retryerParams.variables Object with arguments to pass to the fetcher function.
|
||||||
* @returns {Promise<T>} The response from the fetcher function.
|
* @param {number} retryerParams.retries How many times to retry.
|
||||||
|
* @returns Promise<retryer>
|
||||||
*/
|
*/
|
||||||
const retryer = async (fetcher, variables, retries = 0) => {
|
const retryer = async (fetcher, variables, retries = 0) => {
|
||||||
if (retries > RETRIES) {
|
if (retries > RETRIES) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { CustomError, MissingParamError } from "../common/utils.js";
|
import { CustomError, MissingParamError } from "../common/utils.js";
|
||||||
|
import { I18n } from "../common/I18n.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WakaTime data fetcher.
|
* WakaTime data fetcher.
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates progress along the boundary of the circle i.e it's circumference.
|
* Calculates progress along the boundary of the circle i.e it's circumference.
|
||||||
*
|
*
|
||||||
@@ -76,7 +75,6 @@ const getAnimations = () => {
|
|||||||
* @returns {string} Card CSS styles.
|
* @returns {string} Card CSS styles.
|
||||||
*/
|
*/
|
||||||
const getStyles = ({
|
const getStyles = ({
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
titleColor,
|
titleColor,
|
||||||
textColor,
|
textColor,
|
||||||
iconColor,
|
iconColor,
|
||||||
|
|||||||
+3
-37
@@ -1,14 +1,11 @@
|
|||||||
// @ts-check
|
|
||||||
|
|
||||||
import { encodeHTML } from "./common/utils.js";
|
import { encodeHTML } from "./common/utils.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves stat card labels in the available locales.
|
* Retrieves stat card labels in the available locales.
|
||||||
*
|
*
|
||||||
* @param {object} props Function arguments.
|
* @param {string} name The name of the locale.
|
||||||
* @param {string} props.name The name of the locale.
|
* @param {string} apostrophe Whether to use apostrophe or not.
|
||||||
* @param {string} props.apostrophe Whether to use apostrophe or not.
|
* @returns {Object} The locales object.
|
||||||
* @returns {object} The locales object.
|
|
||||||
*
|
*
|
||||||
* @see https://www.andiamo.co.uk/resources/iso-language-codes/ for language codes.
|
* @see https://www.andiamo.co.uk/resources/iso-language-codes/ for language codes.
|
||||||
*/
|
*/
|
||||||
@@ -46,37 +43,6 @@ const statCardLocales = ({ name, apostrophe }) => {
|
|||||||
vi: `Thống Kê GitHub ${encodedName}`,
|
vi: `Thống Kê GitHub ${encodedName}`,
|
||||||
se: `GitHubstatistik för ${encodedName}`,
|
se: `GitHubstatistik för ${encodedName}`,
|
||||||
},
|
},
|
||||||
"statcard.ranktitle": {
|
|
||||||
ar: `${encodedName} إحصائيات غيت هاب`,
|
|
||||||
cn: `${encodedName} 的 GitHub 统计数据`,
|
|
||||||
"zh-tw": `${encodedName} 的 GitHub 統計數據`,
|
|
||||||
cs: `GitHub statistiky uživatele ${encodedName}`,
|
|
||||||
de: `${encodedName + apostrophe} GitHub-Statistiken`,
|
|
||||||
en: `${encodedName}'${apostrophe} GitHub Rank`,
|
|
||||||
bn: `${encodedName} এর GitHub পরিসংখ্যান`,
|
|
||||||
es: `Estadísticas de GitHub de ${encodedName}`,
|
|
||||||
fr: `Statistiques GitHub de ${encodedName}`,
|
|
||||||
hu: `${encodedName} GitHub statisztika`,
|
|
||||||
it: `Statistiche GitHub di ${encodedName}`,
|
|
||||||
ja: `${encodedName} の GitHub ランク`,
|
|
||||||
kr: `${encodedName}의 GitHub 통계`,
|
|
||||||
nl: `${encodedName}'${apostrophe} GitHub-statistieken`,
|
|
||||||
"pt-pt": `Estatísticas do GitHub de ${encodedName}`,
|
|
||||||
"pt-br": `Estatísticas do GitHub de ${encodedName}`,
|
|
||||||
np: `${encodedName}'${apostrophe} गिटहब तथ्याङ्क`,
|
|
||||||
el: `Στατιστικά GitHub του ${encodedName}`,
|
|
||||||
ru: `Статистика GitHub пользователя ${encodedName}`,
|
|
||||||
"uk-ua": `Статистика GitHub користувача ${encodedName}`,
|
|
||||||
id: `Statistik GitHub ${encodedName}`,
|
|
||||||
ml: `${encodedName}'${apostrophe} ഗിറ്റ്ഹബ് സ്ഥിതിവിവരക്കണക്കുകൾ`,
|
|
||||||
my: `Statistik GitHub ${encodedName}`,
|
|
||||||
sk: `GitHub štatistiky používateľa ${encodedName}`,
|
|
||||||
tr: `${encodedName} Hesabının GitHub Yıldızları`,
|
|
||||||
pl: `Statystyki GitHub użytkownika ${encodedName}`,
|
|
||||||
uz: `${encodedName}ning GitHub'dagi statistikasi`,
|
|
||||||
vi: `Thống Kê GitHub ${encodedName}`,
|
|
||||||
se: `GitHubstatistik för ${encodedName}`,
|
|
||||||
},
|
|
||||||
"statcard.totalstars": {
|
"statcard.totalstars": {
|
||||||
ar: "مجموع النجوم",
|
ar: "مجموع النجوم",
|
||||||
cn: "获标星数(star)",
|
cn: "获标星数(star)",
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import api from "../api/index.js";
|
|||||||
import { calculateRank } from "../src/calculateRank.js";
|
import { calculateRank } from "../src/calculateRank.js";
|
||||||
import { renderStatsCard } from "../src/cards/stats-card.js";
|
import { renderStatsCard } from "../src/cards/stats-card.js";
|
||||||
import { CONSTANTS, renderError } from "../src/common/utils.js";
|
import { CONSTANTS, renderError } from "../src/common/utils.js";
|
||||||
import { expect, it, describe, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
const stats = {
|
const stats = {
|
||||||
name: "Anurag Hazra",
|
name: "Anurag Hazra",
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
import { calculateRank } from "../src/calculateRank.js";
|
import { calculateRank } from "../src/calculateRank.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
describe("Test calculateRank", () => {
|
describe("Test calculateRank", () => {
|
||||||
it("new user gets C rank", () => {
|
it("new user gets C rank", () => {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { cssToObject } from "@uppercod/css-to-object";
|
|||||||
import { Card } from "../src/common/Card.js";
|
import { Card } from "../src/common/Card.js";
|
||||||
import { icons } from "../src/common/icons.js";
|
import { icons } from "../src/common/icons.js";
|
||||||
import { getCardColors } from "../src/common/utils.js";
|
import { getCardColors } from "../src/common/utils.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
describe("Card", () => {
|
describe("Card", () => {
|
||||||
it("should hide border", () => {
|
it("should hide border", () => {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
|
import { describe } from "@jest/globals";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { renderRepoCard } from "../../src/cards/repo-card.js";
|
import { renderRepoCard } from "../../src/cards/repo-card.js";
|
||||||
import { renderStatsCard } from "../../src/cards/stats-card.js";
|
import { renderStatsCard } from "../../src/cards/stats-card.js";
|
||||||
import { renderTopLanguages } from "../../src/cards/top-languages-card.js";
|
import { renderTopLanguages } from "../../src/cards/top-languages-card.js";
|
||||||
import { renderWakatimeCard } from "../../src/cards/wakatime-card.js";
|
import { renderWakatimeCard } from "../../src/cards/wakatime-card.js";
|
||||||
import { expect, describe, beforeAll, test } from "@jest/globals";
|
|
||||||
|
|
||||||
const REPO = "curly-fiesta";
|
const REPO = "curly-fiesta";
|
||||||
const USER = "catelinemnemosyne";
|
const USER = "catelinemnemosyne";
|
||||||
@@ -108,7 +108,7 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if stats card from deployment matches the stats card from local.
|
// Check if stats card from deployment matches the stats card from local.
|
||||||
expect(serverStatsSvg.data).toEqual(localStatsCardSVG);
|
expect(serverStatsSvg.data).toEqual(localStatsCardSVG);
|
||||||
}, 15000);
|
}, 7000);
|
||||||
|
|
||||||
test("retrieve language card", async () => {
|
test("retrieve language card", async () => {
|
||||||
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
||||||
@@ -133,7 +133,7 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if language card from deployment matches the local language card.
|
// Check if language card from deployment matches the local language card.
|
||||||
expect(severLanguageSVG.data).toEqual(localLanguageCardSVG);
|
expect(severLanguageSVG.data).toEqual(localLanguageCardSVG);
|
||||||
}, 15000);
|
});
|
||||||
|
|
||||||
test("retrieve WakaTime card", async () => {
|
test("retrieve WakaTime card", async () => {
|
||||||
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
||||||
@@ -153,7 +153,7 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if WakaTime card from deployment matches the local WakaTime card.
|
// Check if WakaTime card from deployment matches the local WakaTime card.
|
||||||
expect(serverWakaTimeSvg.data).toEqual(localWakaCardSVG);
|
expect(serverWakaTimeSvg.data).toEqual(localWakaCardSVG);
|
||||||
}, 15000);
|
});
|
||||||
|
|
||||||
test("retrieve repo card", async () => {
|
test("retrieve repo card", async () => {
|
||||||
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
||||||
@@ -175,5 +175,5 @@ describe("Fetch Cards", () => {
|
|||||||
|
|
||||||
// Check if Repo card from deployment matches the local Repo card.
|
// Check if Repo card from deployment matches the local Repo card.
|
||||||
expect(serverRepoSvg.data).toEqual(localRepoCardSVG);
|
expect(serverRepoSvg.data).toEqual(localRepoCardSVG);
|
||||||
}, 15000);
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import "@testing-library/jest-dom";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { fetchRepo } from "../src/fetchers/repo-fetcher.js";
|
import { fetchRepo } from "../src/fetchers/repo-fetcher.js";
|
||||||
import { expect, it, describe, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
const data_repo = {
|
const data_repo = {
|
||||||
repository: {
|
repository: {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import axios from "axios";
|
|||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { calculateRank } from "../src/calculateRank.js";
|
import { calculateRank } from "../src/calculateRank.js";
|
||||||
import { fetchStats } from "../src/fetchers/stats-fetcher.js";
|
import { fetchStats } from "../src/fetchers/stats-fetcher.js";
|
||||||
import { expect, it, describe, beforeEach, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
// Test parameters.
|
// Test parameters.
|
||||||
const data_stats = {
|
const data_stats = {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import "@testing-library/jest-dom";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { fetchTopLanguages } from "../src/fetchers/top-languages-fetcher.js";
|
import { fetchTopLanguages } from "../src/fetchers/top-languages-fetcher.js";
|
||||||
import { expect, it, describe, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import "@testing-library/jest-dom";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import { fetchWakatimeStats } from "../src/fetchers/wakatime-fetcher.js";
|
import { fetchWakatimeStats } from "../src/fetchers/wakatime-fetcher.js";
|
||||||
import { expect, it, describe, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { flexLayout } from "../src/common/utils.js";
|
import { flexLayout } from "../src/common/utils.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
describe("flexLayout", () => {
|
describe("flexLayout", () => {
|
||||||
it("should work with row & col layouts", () => {
|
it("should work with row & col layouts", () => {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { jest } from "@jest/globals";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import patInfo, { RATE_LIMIT_SECONDS } from "../api/status/pat-info.js";
|
import patInfo, { RATE_LIMIT_SECONDS } from "../api/status/pat-info.js";
|
||||||
import { expect, it, describe, afterEach, beforeAll } from "@jest/globals";
|
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import MockAdapter from "axios-mock-adapter";
|
|||||||
import pin from "../api/pin.js";
|
import pin from "../api/pin.js";
|
||||||
import { renderRepoCard } from "../src/cards/repo-card.js";
|
import { renderRepoCard } from "../src/cards/repo-card.js";
|
||||||
import { renderError } from "../src/common/utils.js";
|
import { renderError } from "../src/common/utils.js";
|
||||||
import { expect, it, describe, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
const data_repo = {
|
const data_repo = {
|
||||||
repository: {
|
repository: {
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { queryByTestId } from "@testing-library/dom";
|
|||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
import { cssToObject } from "@uppercod/css-to-object";
|
import { cssToObject } from "@uppercod/css-to-object";
|
||||||
import { renderRepoCard } from "../src/cards/repo-card.js";
|
import { renderRepoCard } from "../src/cards/repo-card.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
import { themes } from "../themes/index.js";
|
import { themes } from "../themes/index.js";
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import {
|
|||||||
} from "@testing-library/dom";
|
} from "@testing-library/dom";
|
||||||
import { cssToObject } from "@uppercod/css-to-object";
|
import { cssToObject } from "@uppercod/css-to-object";
|
||||||
import { renderStatsCard } from "../src/cards/stats-card.js";
|
import { renderStatsCard } from "../src/cards/stats-card.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
// adds special assertions like toHaveTextContent
|
// adds special assertions like toHaveTextContent
|
||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
|
|
||||||
@@ -433,4 +431,14 @@ describe("Test renderStatsCard", () => {
|
|||||||
queryByTestId(document.body, "percentile-rank-value").textContent.trim(),
|
queryByTestId(document.body, "percentile-rank-value").textContent.trim(),
|
||||||
).toBe(stats.rank.percentile.toFixed(1) + "%");
|
).toBe(stats.rank.percentile.toFixed(1) + "%");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should show the progress", () => {
|
||||||
|
document.body.innerHTML = renderStatsCard(stats, {
|
||||||
|
rank_icon: "progress",
|
||||||
|
});
|
||||||
|
expect(queryByTestId(document.body, "rank-progress-text")).toBeDefined();
|
||||||
|
expect(
|
||||||
|
queryByTestId(document.body, "progress-rank-icon").textContent.trim(),
|
||||||
|
).toBe((100 - stats.rank.percentile).toFixed(1) + "%");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import {
|
|||||||
MIN_CARD_WIDTH,
|
MIN_CARD_WIDTH,
|
||||||
getDefaultLanguagesCountByLayout,
|
getDefaultLanguagesCountByLayout,
|
||||||
} from "../src/cards/top-languages-card.js";
|
} from "../src/cards/top-languages-card.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
// adds special assertions like toHaveTextContent
|
// adds special assertions like toHaveTextContent
|
||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
@@ -47,7 +46,7 @@ const langs = {
|
|||||||
* Retrieve number array from SVG path definition string.
|
* Retrieve number array from SVG path definition string.
|
||||||
*
|
*
|
||||||
* @param {string} d SVG path definition string.
|
* @param {string} d SVG path definition string.
|
||||||
* @returns {number[]} Resulting numbers array.
|
* @return {number[]} Resulting numbers array.
|
||||||
*/
|
*/
|
||||||
const getNumbersFromSvgPathDefinitionAttribute = (d) => {
|
const getNumbersFromSvgPathDefinitionAttribute = (d) => {
|
||||||
return d
|
return d
|
||||||
@@ -79,7 +78,7 @@ const langPercentFromDonutLayoutSvg = (d, centerX, centerY) => {
|
|||||||
*
|
*
|
||||||
* @param {number} partLength Length of current chart part..
|
* @param {number} partLength Length of current chart part..
|
||||||
* @param {number} totalCircleLength Total length of circle.
|
* @param {number} totalCircleLength Total length of circle.
|
||||||
* @returns {number} Chart part percentage.
|
* @return {number} Chart part percentage.
|
||||||
*/
|
*/
|
||||||
const langPercentFromDonutVerticalLayoutSvg = (
|
const langPercentFromDonutVerticalLayoutSvg = (
|
||||||
partLength,
|
partLength,
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ import "@testing-library/jest-dom";
|
|||||||
import { renderWakatimeCard } from "../src/cards/wakatime-card.js";
|
import { renderWakatimeCard } from "../src/cards/wakatime-card.js";
|
||||||
import { getCardColors } from "../src/common/utils.js";
|
import { getCardColors } from "../src/common/utils.js";
|
||||||
import { wakaTimeData } from "./fetchWakatime.test.js";
|
import { wakaTimeData } from "./fetchWakatime.test.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
describe("Test Render Wakatime Card", () => {
|
describe("Test Render Wakatime Card", () => {
|
||||||
it("should render correctly", () => {
|
it("should render correctly", () => {
|
||||||
// const card = renderWakatimeCard(wakaTimeData.data);
|
const card = renderWakatimeCard(wakaTimeData.data);
|
||||||
expect(getCardColors).toMatchSnapshot();
|
expect(getCardColors).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,20 @@ import { jest } from "@jest/globals";
|
|||||||
import "@testing-library/jest-dom";
|
import "@testing-library/jest-dom";
|
||||||
import { retryer } from "../src/common/retryer.js";
|
import { retryer } from "../src/common/retryer.js";
|
||||||
import { logger } from "../src/common/utils.js";
|
import { logger } from "../src/common/utils.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
const fetcher = jest.fn((variables, token) => {
|
const fetcher = jest.fn((variables, token) => {
|
||||||
logger.log(variables, token);
|
logger.log(variables, token);
|
||||||
return new Promise((res) => res({ data: "ok" }));
|
return new Promise((res, rej) => res({ data: "ok" }));
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetcherFail = jest.fn(() => {
|
const fetcherFail = jest.fn(() => {
|
||||||
return new Promise((res) =>
|
return new Promise((res, rej) =>
|
||||||
res({ data: { errors: [{ type: "RATE_LIMITED" }] } }),
|
res({ data: { errors: [{ type: "RATE_LIMITED" }] } }),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetcherFailOnSecondTry = jest.fn((_vars, _token, retries) => {
|
const fetcherFailOnSecondTry = jest.fn((_vars, _token, retries) => {
|
||||||
return new Promise((res) => {
|
return new Promise((res, rej) => {
|
||||||
// faking rate limit
|
// faking rate limit
|
||||||
if (retries < 1) {
|
if (retries < 1) {
|
||||||
return res({ data: { errors: [{ type: "RATE_LIMITED" }] } });
|
return res({ data: { errors: [{ type: "RATE_LIMITED" }] } });
|
||||||
@@ -41,8 +40,10 @@ describe("Test Retryer", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("retryer should throw error if maximum retries reached", async () => {
|
it("retryer should throw error if maximum retries reached", async () => {
|
||||||
|
let res;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await retryer(fetcherFail, {});
|
res = await retryer(fetcherFail, {});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
expect(fetcherFail).toBeCalledTimes(8);
|
expect(fetcherFail).toBeCalledTimes(8);
|
||||||
expect(err.message).toBe("Maximum retries exceeded");
|
expect(err.message).toBe("Maximum retries exceeded");
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { jest } from "@jest/globals";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MockAdapter from "axios-mock-adapter";
|
import MockAdapter from "axios-mock-adapter";
|
||||||
import up, { RATE_LIMIT_SECONDS } from "../api/status/up.js";
|
import up, { RATE_LIMIT_SECONDS } from "../api/status/up.js";
|
||||||
import { expect, it, describe, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
const mock = new MockAdapter(axios);
|
const mock = new MockAdapter(axios);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import MockAdapter from "axios-mock-adapter";
|
|||||||
import topLangs from "../api/top-langs.js";
|
import topLangs from "../api/top-langs.js";
|
||||||
import { renderTopLanguages } from "../src/cards/top-languages-card.js";
|
import { renderTopLanguages } from "../src/cards/top-languages-card.js";
|
||||||
import { renderError } from "../src/common/utils.js";
|
import { renderError } from "../src/common/utils.js";
|
||||||
import { expect, it, describe, afterEach } from "@jest/globals";
|
|
||||||
|
|
||||||
const data_langs = {
|
const data_langs = {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
renderError,
|
renderError,
|
||||||
wrapTextMultiline,
|
wrapTextMultiline,
|
||||||
} from "../src/common/utils.js";
|
} from "../src/common/utils.js";
|
||||||
import { expect, it, describe } from "@jest/globals";
|
|
||||||
|
|
||||||
describe("Test utils.js", () => {
|
describe("Test utils.js", () => {
|
||||||
it("should test kFormatter", () => {
|
it("should test kFormatter", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user