forked from mirrored/github-readme-stats
Compare commits
106
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43bf4b4b5b | ||
|
|
e8d465d810 | ||
|
|
2d3b4de24c | ||
|
|
dc5d23e187 | ||
|
|
6d086b4c40 | ||
|
|
58d8cd4e67 | ||
|
|
8bae143e27 | ||
|
|
cc47d8939d | ||
|
|
42b5cdd025 | ||
|
|
254e7e9a08 | ||
|
|
90ce468a1d | ||
|
|
ec47a8ab5e | ||
|
|
3b8597d034 | ||
|
|
cf1d02465f | ||
|
|
e920eda832 | ||
|
|
64a6481ecd | ||
|
|
cfd6464b4f | ||
|
|
f3136d2d20 | ||
|
|
ffafcf29ed | ||
|
|
d7b534abb8 | ||
|
|
79545927f1 | ||
|
|
0f8a790cc3 | ||
|
|
f3341ddf5f | ||
|
|
6822dc77d4 | ||
|
|
36eb17ffbb | ||
|
|
1ee613765e | ||
|
|
b2917beabf | ||
|
|
a70799b695 | ||
|
|
74f584c22e | ||
|
|
833324fc0d | ||
|
|
b6d5835441 | ||
|
|
95b3170655 | ||
|
|
e5c412f0b0 | ||
|
|
ad5fa199ff | ||
|
|
33b7bd1858 | ||
|
|
cde3b512c8 | ||
|
|
961747ff84 | ||
|
|
b0b125ef03 | ||
|
|
0173e13e39 | ||
|
|
16c6caaa52 | ||
|
|
82917825f9 | ||
|
|
65ad198d62 | ||
|
|
a3b8a7856c | ||
|
|
889f5e2fa3 | ||
|
|
b0b1b17bf7 | ||
|
|
09c2aa0211 | ||
|
|
515f425d9d | ||
|
|
d24a5ec0b7 | ||
|
|
75906a3ba1 | ||
|
|
c750f773dd | ||
|
|
0641f93387 | ||
|
|
2c206eed80 | ||
|
|
ea65c00f8d | ||
|
|
f2171b4165 | ||
|
|
aa4cebb010 | ||
|
|
f246d6d638 | ||
|
|
78a78e2694 | ||
|
|
ad8cdb2ede | ||
|
|
5a3470a8e3 | ||
|
|
b56689b4bd | ||
|
|
0c380e3982 | ||
|
|
96d3a47a9f | ||
|
|
ad54117e4b | ||
|
|
6835adfc2b | ||
|
|
07dd6f8f46 | ||
|
|
5c64e41c8f | ||
|
|
fa20da1839 | ||
|
|
f7b51ab3c8 | ||
|
|
9181869cb0 | ||
|
|
214838db09 | ||
|
|
813ad3e7d6 | ||
|
|
2be4f86efd | ||
|
|
53d9bebee2 | ||
|
|
87619d618e | ||
|
|
4eb01d80a2 | ||
|
|
45f4320008 | ||
|
|
d5fdfe1251 | ||
|
|
9ca24c67cc | ||
|
|
1bfad4604d | ||
|
|
317a3d920e | ||
|
|
ebbadef5f6 | ||
|
|
6dbc1f5a9e | ||
|
|
631dfe7402 | ||
|
|
ebafbfc9ab | ||
|
|
1726c5bb99 | ||
|
|
b7928aae24 | ||
|
|
6c92fe9d2a | ||
|
|
de4efa9ea1 | ||
|
|
888c4cee94 | ||
|
|
ecac85edd5 | ||
|
|
720617a817 | ||
|
|
5d959bc76c | ||
|
|
0d74d5a25d | ||
|
|
c3a8086e45 | ||
|
|
40c5f41caf | ||
|
|
9f7184cc9e | ||
|
|
ee978f332b | ||
|
|
f0268559e0 | ||
|
|
0b642d4fd6 | ||
|
|
e2fa7ad423 | ||
|
|
18c9de0a18 | ||
|
|
b7eb65f819 | ||
|
|
a7998f0186 | ||
|
|
5486e2ca06 | ||
|
|
e5f1399cc2 | ||
|
|
a48d653fa4 |
+235
@@ -0,0 +1,235 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Maintain dependencies for NPM
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
|
# Maintain dependencies for GitHub Actions
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
open-pull-requests-limit: 10
|
||||||
@@ -7,6 +7,7 @@ documentation:
|
|||||||
- readme.md
|
- readme.md
|
||||||
- CONTRIBUTING.md
|
- CONTRIBUTING.md
|
||||||
- CODE_OF_CONDUCT.md
|
- CODE_OF_CONDUCT.md
|
||||||
|
- SECURITY.md
|
||||||
dependencies:
|
dependencies:
|
||||||
- package.json
|
- package.json
|
||||||
- package-lock.json
|
- package-lock.json
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ jobs:
|
|||||||
if: github.repository == 'anuraghazra/github-readme-stats'
|
if: github.repository == 'anuraghazra/github-readme-stats'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
- name: Deployment Prep
|
- name: Deployment Prep
|
||||||
run: python ./.github/workflows/deploy-prep.py
|
run: python ./.github/workflows/deploy-prep.py
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
|
||||||
with:
|
with:
|
||||||
branch: vercel
|
branch: vercel
|
||||||
create_branch: true
|
create_branch: true
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ name: Test Deployment
|
|||||||
on:
|
on:
|
||||||
deployment_status:
|
deployment_status:
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2eTests:
|
e2eTests:
|
||||||
if:
|
if:
|
||||||
@@ -15,10 +17,10 @@ jobs:
|
|||||||
node-version: [18.x]
|
node-version: [18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
@@ -6,16 +6,30 @@ 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'
|
||||||
name: Close empty issues
|
name: Close empty issues
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3 # NOTE: Retrieve issue templates.
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 # NOTE: Retrieve issue templates.
|
||||||
|
|
||||||
- name: Run empty issues closer action
|
- name: Run empty issues closer action
|
||||||
uses: rickstaa/empty-issues-closer-action@v1
|
uses: rickstaa/empty-issues-closer-action@09d48dba81e64a390dce550d643fb54cd1636d97 # v1.1.2
|
||||||
env:
|
env:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -6,6 +6,20 @@ 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
|
||||||
@@ -15,10 +29,10 @@ jobs:
|
|||||||
node-version: [18.x]
|
node-version: [18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -35,7 +49,7 @@ jobs:
|
|||||||
CI: true
|
CI: true
|
||||||
|
|
||||||
- name: Run Script
|
- name: Run Script
|
||||||
uses: skx/github-action-tester@master
|
uses: skx/github-action-tester@e29768ff4ff67be9d1fdbccd8836ab83233bebb1 # v0.10.0
|
||||||
with:
|
with:
|
||||||
script: ./scripts/push-theme-readme.sh
|
script: ./scripts/push-theme-readme.sh
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -2,11 +2,25 @@ 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'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/labeler@v4
|
- uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: "Run analysis"
|
||||||
|
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
|
||||||
|
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@0ba4244466797eb048eb91a6cd43d5c03ca8bd05 # v2.21.2
|
||||||
|
with:
|
||||||
|
sarif_file: results.sarif
|
||||||
@@ -7,6 +7,20 @@ 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
|
||||||
@@ -16,15 +30,15 @@ jobs:
|
|||||||
node-version: [18.x]
|
node-version: [18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@c5482d70ec8706408996e31ac94075030694993f # v1.8.32
|
||||||
with:
|
with:
|
||||||
useLockFile: false
|
useLockFile: false
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,26 @@ 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
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,8 +1,31 @@
|
|||||||
name: Close stale theme pull requests that have the 'invalid' label.
|
name: Close stale theme pull requests that have the 'invalid' label.
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
# ┌───────────── minute (0 - 59)
|
||||||
|
# │ ┌───────────── hour (0 - 23)
|
||||||
|
# │ │ ┌───────────── day of the month (1 - 31)
|
||||||
|
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
||||||
|
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# * * * * *
|
||||||
- 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'
|
||||||
@@ -13,15 +36,15 @@ jobs:
|
|||||||
node-version: [18.x]
|
node-version: [18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
- uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@c5482d70ec8706408996e31ac94075030694993f # v1.8.32
|
||||||
with:
|
with:
|
||||||
useLockFile: false
|
useLockFile: false
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ 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
|
||||||
@@ -16,10 +18,10 @@ jobs:
|
|||||||
node-version: [18.x]
|
node-version: [18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -29,9 +31,13 @@ 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
|
||||||
|
|
||||||
- name: Code Coverage
|
- name: Code Coverage
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
|
||||||
|
|||||||
@@ -1,9 +1,32 @@
|
|||||||
name: Update top issues dashboard
|
name: Update top issues dashboard
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
# ┌───────────── minute (0 - 59)
|
||||||
|
# │ ┌───────────── hour (0 - 23)
|
||||||
|
# │ │ ┌───────────── day of the month (1 - 31)
|
||||||
|
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
||||||
|
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# * * * * *
|
||||||
- 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'
|
||||||
@@ -11,7 +34,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Run top issues action
|
- name: Run top issues action
|
||||||
uses: rickstaa/top-issues-action@v1
|
uses: rickstaa/top-issues-action@c66e5d53ffc26f7ae020ff8454582884d4af4cdb # v1.3.32
|
||||||
env:
|
env:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -1,8 +1,31 @@
|
|||||||
name: Update supported languages
|
name: Update supported languages
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
# ┌───────────── minute (0 - 59)
|
||||||
|
# │ ┌───────────── hour (0 - 23)
|
||||||
|
# │ │ ┌───────────── day of the month (1 - 31)
|
||||||
|
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
||||||
|
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# * * * * *
|
||||||
- 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'
|
||||||
@@ -13,10 +36,10 @@ jobs:
|
|||||||
node-version: [18.x]
|
node-version: [18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -30,7 +53,7 @@ jobs:
|
|||||||
run: npm run generate-langs-json
|
run: npm run generate-langs-json
|
||||||
|
|
||||||
- name: Create Pull Request if upstream language file is changed
|
- name: Create Pull Request if upstream language file is changed
|
||||||
uses: peter-evans/create-pull-request@v4
|
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
|
||||||
with:
|
with:
|
||||||
commit-message: "refactor: update languages JSON"
|
commit-message: "refactor: update languages JSON"
|
||||||
branch: "update_langs/patch"
|
branch: "update_langs/patch"
|
||||||
|
|||||||
@@ -2,4 +2,5 @@
|
|||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
npm test
|
npm test
|
||||||
|
npm run lint
|
||||||
npx lint-staged
|
npx lint-staged
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"yzhang.markdown-all-in-one",
|
"yzhang.markdown-all-in-one",
|
||||||
"esbenp.prettier-vscode"
|
"esbenp.prettier-vscode",
|
||||||
|
"dbaeumer.vscode-eslint"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"markdown.extension.toc.levels": "1..3",
|
"markdown.extension.toc.levels": "1..3",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-5
@@ -40,21 +40,24 @@ _(make sure you already have a [Vercel](https://vercel.com/) account)_
|
|||||||
8. Run the command `vercel dev` to start a development server at <https://localhost:3000>.
|
8. Run the command `vercel dev` to start a development server at <https://localhost:3000>.
|
||||||
9. The cards will then be available from this local endpoint (i.e. `https://localhost:3000/api?username=anuraghazra`).
|
9. The cards will then be available from this local endpoint (i.e. `https://localhost:3000/api?username=anuraghazra`).
|
||||||
|
|
||||||
> **Note**
|
> [!NOTE]\
|
||||||
> You can debug the package code in [Vscode](https://code.visualstudio.com/) by using the [Node.js: Attach to process](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_setting-up-an-attach-configuration) debug option. You can also debug any tests using the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest). For more information, see https://github.com/jest-community/vscode-jest/issues/912.
|
> You can debug the package code in [Vscode](https://code.visualstudio.com/) by using the [Node.js: Attach to process](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_setting-up-an-attach-configuration) debug option. You can also debug any tests using the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest). For more information, see https://github.com/jest-community/vscode-jest/issues/912.
|
||||||
|
|
||||||
## Themes Contribution
|
## Themes Contribution
|
||||||
|
|
||||||
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.
|
||||||
|
|||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
# GitHub Readme Stats Security Policies and Procedures <!-- omit in toc -->
|
||||||
|
|
||||||
|
This document outlines security procedures and general policies for the
|
||||||
|
GitHub Readme Stats project.
|
||||||
|
|
||||||
|
- [Reporting a Vulnerability](#reporting-a-vulnerability)
|
||||||
|
- [Disclosure Policy](#disclosure-policy)
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
The GitHub Readme Stats team and community take all security vulnerabilities
|
||||||
|
seriously. Thank you for improving the security of our open source
|
||||||
|
software. We appreciate your efforts and responsible disclosure and will
|
||||||
|
make every effort to acknowledge your contributions.
|
||||||
|
|
||||||
|
Report security vulnerabilities by emailing the GitHub Readme Stats team at:
|
||||||
|
|
||||||
|
```
|
||||||
|
hazru.anurag@gmail.com
|
||||||
|
```
|
||||||
|
|
||||||
|
The lead maintainer will acknowledge your email within 24 hours, and will
|
||||||
|
send a more detailed response within 48 hours indicating the next steps in
|
||||||
|
handling your report. After the initial reply to your report, the security
|
||||||
|
team will endeavor to keep you informed of the progress towards a fix and
|
||||||
|
full announcement, and may ask for additional information or guidance.
|
||||||
|
|
||||||
|
Report security vulnerabilities in third-party modules to the person or
|
||||||
|
team maintaining the module.
|
||||||
|
|
||||||
|
## Disclosure Policy
|
||||||
|
|
||||||
|
When the security team receives a security bug report, they will assign it
|
||||||
|
to a primary handler. This person will coordinate the fix and release
|
||||||
|
process, involving the following steps:
|
||||||
|
|
||||||
|
* Confirm the problem.
|
||||||
|
* Audit code to find any potential similar problems.
|
||||||
|
* Prepare fixes and release them as fast as possible.
|
||||||
+7
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
-1
@@ -8,8 +8,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -17,6 +20,9 @@
|
|||||||
<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
-1
@@ -8,8 +8,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -17,6 +20,9 @@
|
|||||||
<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
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
-1
@@ -7,8 +7,11 @@
|
|||||||
<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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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" />
|
||||||
@@ -16,6 +19,9 @@
|
|||||||
<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
+3451
-1222
File diff suppressed because it is too large
Load Diff
+17
-14
@@ -29,35 +29,38 @@
|
|||||||
"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",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/core": "^1.9.1",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^5.1.1",
|
||||||
"@testing-library/dom": "^8.17.1",
|
"@testing-library/dom": "^9.3.1",
|
||||||
"@testing-library/jest-dom": "^5.16.5",
|
"@testing-library/jest-dom": "^5.17.0",
|
||||||
"@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.5",
|
||||||
"color-contrast-checker": "^2.1.0",
|
"color-contrast-checker": "^2.1.0",
|
||||||
|
"eslint": "^8.46.0",
|
||||||
|
"eslint-config-prettier": "^8.9.0",
|
||||||
"hjson": "^3.2.2",
|
"hjson": "^3.2.2",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.3",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.6.2",
|
||||||
"jest-environment-jsdom": "^29.5.0",
|
"jest-environment-jsdom": "^29.6.2",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"lint-staged": "^13.0.3",
|
"lint-staged": "^13.2.3",
|
||||||
"lodash.snakecase": "^4.1.1",
|
"lodash.snakecase": "^4.1.1",
|
||||||
"parse-diff": "^0.7.0",
|
"parse-diff": "^0.11.1",
|
||||||
"prettier": "^2.1.2"
|
"prettier": "^3.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^16.3.1",
|
||||||
"emoji-name-map": "^1.2.8",
|
"emoji-name-map": "^1.2.8",
|
||||||
"github-username-regex": "^1.0.0",
|
"github-username-regex": "^1.0.0",
|
||||||
"upgrade": "^1.1.0",
|
"upgrade": "^1.1.0",
|
||||||
"word-wrap": "^1.2.3"
|
"word-wrap": "^1.2.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,css,md}": "prettier --write"
|
"*.{js,css,md}": "prettier --write"
|
||||||
|
|||||||
@@ -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 src="https://codecov.io/gh/anuraghazra/github-readme-stats/branch/master/graph/badge.svg" />
|
<img alt="Tests Coverage" 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,6 +19,9 @@
|
|||||||
<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">
|
||||||
@@ -65,6 +68,8 @@
|
|||||||
</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">
|
||||||
@@ -75,7 +80,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 effected 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 affected 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:
|
||||||
|
|
||||||
@@ -118,7 +123,7 @@ Please visit [this link](https://give.do/fundraisers/stand-beside-the-victims-of
|
|||||||
|
|
||||||
# Important Notice <!-- omit in toc -->
|
# Important Notice <!-- omit in toc -->
|
||||||
|
|
||||||
> **Warning**
|
> [!IMPORTANT]\
|
||||||
> Since the GitHub API only [allows 5k requests per hour per user account](https://docs.github.com/en/graphql/overview/resource-limitations), the public Vercel instance hosted on `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). We use caching to prevent this from happening (see https://github.com/anuraghazra/github-readme-stats#common-options). You can turn off these rate limit protections by deploying [your own Vercel instance](#disable-rate-limit-protections).
|
> Since the GitHub API only [allows 5k requests per hour per user account](https://docs.github.com/en/graphql/overview/resource-limitations), the public Vercel instance hosted on `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). We use caching to prevent this from happening (see https://github.com/anuraghazra/github-readme-stats#common-options). You can turn off these rate limit protections by deploying [your own Vercel instance](#disable-rate-limit-protections).
|
||||||
|
|
||||||
# GitHub Stats Card
|
# GitHub Stats Card
|
||||||
@@ -131,11 +136,11 @@ Change the `?username=` value to your GitHub username.
|
|||||||
[](https://github.com/anuraghazra/github-readme-stats)
|
[](https://github.com/anuraghazra/github-readme-stats)
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Warning**
|
> [!WARNING]\
|
||||||
> By default, the stats card only shows statistics like stars, commits and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token.
|
> By default, the stats card only shows statistics like stars, commits and pull requests from public repositories. To show private statistics on the stats card, you should [deploy your own instance](#deploy-on-your-own) using your own GitHub API token.
|
||||||
|
|
||||||
> **Note**
|
> [!NOTE]\
|
||||||
> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, issues, stars and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](./src/calculateRank.js). The circle around the rank shows 100 minus the global percentile.
|
> Available ranks are S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%), B (62.5%), B- (75%), C+ (87.5%) and C (everyone). This ranking scheme is based on the [Japanese academic grading](https://wikipedia.org/wiki/Academic_grading_in_Japan) system. The global percentile is calculated as a weighted sum of percentiles for each statistic (number of commits, pull requests, reviews, issues, stars and followers), based on the cumulative distribution function of the [exponential](https://wikipedia.org/wiki/exponential_distribution) and the [log-normal](https://wikipedia.org/wiki/Log-normal_distribution) distributions. The implementation can be investigated at [src/calculateRank.js](./src/calculateRank.js). The circle around the rank shows 100 minus the global percentile.
|
||||||
|
|
||||||
### Hiding individual stats
|
### Hiding individual stats
|
||||||
|
|
||||||
@@ -177,11 +182,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 :D
|
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).
|
||||||
|
|
||||||
#### Responsive Card Theme
|
#### Responsive Card Theme
|
||||||
|
|
||||||
@@ -284,12 +289,12 @@ 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` - set the cache header manually *(min: 14400, max: 86400)*. Default: `14400 seconds (4 hours)`.
|
* `cache_seconds` - Sets the cache header manually *(min: 14400, max: 86400)*. Default: `14400 seconds (4 hours)`.
|
||||||
* `locale` - set the language in the card *(e.g. cn, de, es, etc.)*. Default: `en`.
|
* `locale` - Sets 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]\
|
||||||
> We use caching to decrease the load on our servers (see <https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425>). Our cards have a default cache of 4 hours (14400 seconds). Also, note that the cache is clamped to a minimum of 4 hours and a maximum of 24 hours.
|
> We use caching to decrease the load on our servers (see <https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425>). Our cards have a default cache of 4 hours (14400 seconds). Also, note that the cache is clamped to a minimum of 4 hours and a maximum of 24 hours.
|
||||||
|
|
||||||
##### Gradient in bg\_color
|
##### Gradient in bg\_color
|
||||||
@@ -302,62 +307,62 @@ 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` - Set the card's width manually *(number)*. Default: `500px (approx.)`.
|
* `card_width` - Sets 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`, `progress` or `default`). Default: `default`.
|
* `rank_icon` - Shows alternative rank icon (i.e. `github`, `percentile` or `default`). Default: `default`.
|
||||||
* `show_icons` - *(boolean)*. Default: `false`.
|
* `show_icons` - *(boolean)*. Default: `false`.
|
||||||
* `include_all_commits` - Count total commits instead of just the current year commits *(boolean)*. Default: `false`.
|
* `include_all_commits` - Counts 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` - Exclude stars from specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `exclude_repo` - Excludes 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` - Use bold text *(boolean)*. Default: `true`.
|
* `text_bold` - Uses 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` - Switch between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
|
* `number_format` - Switches between two available formats for displaying the card values `short` (i.e. `6.6k`) and `long` (i.e. `6626`). Default: `short`.
|
||||||
* `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)`.
|
* `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)`.
|
||||||
|
|
||||||
> **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` - Show the repo's owner name *(boolean)*. Default: `false`.
|
* `show_owner` - Shows the repo's owner name *(boolean)*. Default: `false`.
|
||||||
|
|
||||||
#### Language Card Exclusive Options
|
#### Language Card Exclusive Options
|
||||||
|
|
||||||
* `hide` - Hide the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `hide` - Hides the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
||||||
* `hide_title` - *(boolean)*. Default: `false`.
|
* `hide_title` - *(boolean)*. Default: `false`.
|
||||||
* `layout` - Switch between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
|
* `layout` - Switches between five available layouts `normal` & `compact` & `donut` & `donut-vertical` & `pie`. Default: `normal`.
|
||||||
* `card_width` - Set the card's width manually *(number)*. Default `300`.
|
* `card_width` - Sets the card's width manually *(number)*. Default `300`.
|
||||||
* `langs_count` - Show more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts.
|
* `langs_count` - Shows more languages on the card, between 1-20 *(number)*. Default: `5` for `normal` and `donut`, `6` for other layouts.
|
||||||
* `exclude_repo` - Exclude specified repositories *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `exclude_repo` - Excludes 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` - It uses the compact layout option, hides percentages, and removes the bars. Default: `false`.
|
* `hide_progress` - 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.
|
||||||
|
|
||||||
> **Warning**
|
> [!WARNING]\
|
||||||
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
|
> Language names should be URI-escaped, as specified in [Percent Encoding](https://en.wikipedia.org/wiki/Percent-encoding)
|
||||||
> (i.e: `c++` should become `c%2B%2B`, `jupyter notebook` should become `jupyter%20notebook`, etc.) You can use
|
> (i.e: `c++` should become `c%2B%2B`, `jupyter notebook` should become `jupyter%20notebook`, etc.) You can use
|
||||||
> [urlencoder.org](https://www.urlencoder.org/) to help you do this automatically.
|
> [urlencoder.org](https://www.urlencoder.org/) to help you do this automatically.
|
||||||
|
|
||||||
#### Wakatime Card Exclusive Options
|
#### Wakatime Card Exclusive Options
|
||||||
|
|
||||||
* `hide` - Hide the languages specified from the card *(Comma-separated values)*. Default: `[] (blank array)`.
|
* `hide` - Hides 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` - Switch between two available layouts `default` & `compact`. Default `default`.
|
* `layout` - Switches between two available layouts `default` & `compact`. Default `default`.
|
||||||
* `langs_count` - Limit the number of languages on the card, defaults to all reported languages *(number)*.
|
* `langs_count` - Limits the number of languages on the card, defaults to all reported languages *(number)*.
|
||||||
* `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`.
|
* `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`.
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
# GitHub Extra Pins
|
# GitHub Extra Pins
|
||||||
|
|
||||||
GitHub extra pins allow you to pin more than six repositories in your profile using a GitHub readme profile.
|
GitHub extra pins allow you to pin more than 6 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.
|
||||||
|
|
||||||
@@ -381,15 +386,15 @@ 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 top language.
|
The top languages card shows a GitHub user's most frequently used languages.
|
||||||
|
|
||||||
> **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.
|
||||||
|
|
||||||
> **Note**
|
> [!NOTE]\
|
||||||
> Top Languages does not indicate the user's skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats.
|
> Top Languages does not indicate the user's skill level or anything like that; it's a GitHub metric to determine which languages have the most code on GitHub. It is a new feature of github-readme-stats.
|
||||||
|
|
||||||
> **Warning**
|
> [!WARNING]\
|
||||||
> This card shows languages usage only inside your own non-forked repositories, not depending from who is the author of the commits. It does not include your contributions into another users/organizations repositories. Currently there are no way to get this data from GitHub API. If you want this behavior to be improved you can support [this feature request](https://github.com/orgs/community/discussions/18230) created by [@rickstaa](https://github.com/rickstaa) inside GitHub Community.
|
> This card shows languages usage only inside your own non-forked repositories, not depending from who is the author of the commits. It does not include your contributions into another users/organizations repositories. Currently there are no way to get this data from GitHub API. If you want this behavior to be improved you can support [this feature request](https://github.com/orgs/community/discussions/18230) created by [@rickstaa](https://github.com/rickstaa) inside GitHub Community.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
@@ -510,7 +515,7 @@ You can use the `&hide_progress=true` option to hide the percentages and the pro
|
|||||||
|
|
||||||
# Wakatime Stats Card
|
# Wakatime Stats Card
|
||||||
|
|
||||||
> **Warning**
|
> [!WARNING]\
|
||||||
> Please be aware that we currently only show data from Wakatime profiles that are public. You therefore have to make sure that **BOTH** `Display code time publicly` and `Display languages, editors, os, categories publicly` are enabled.
|
> Please be aware that we currently only show data from Wakatime profiles that are public. You therefore have to make sure that **BOTH** `Display code time publicly` and `Display languages, editors, os, categories publicly` are enabled.
|
||||||
|
|
||||||
Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
Change the `?username=` value to your [Wakatime](https://wakatime.com) username.
|
||||||
@@ -553,10 +558,6 @@ 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
|
||||||
|
|
||||||

|

|
||||||
@@ -652,10 +653,10 @@ By default, GitHub does not lay out the cards side by side. To do that, you can
|
|||||||
|
|
||||||
Since the GitHub API only allows 5k requests per hour, my `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter. If you host it on your own Vercel server, then you do not have to worry about anything. Click on the deploy button to get started!
|
Since the GitHub API only allows 5k requests per hour, my `https://github-readme-stats.vercel.app/api` could possibly hit the rate limiter. If you host it on your own Vercel server, then you do not have to worry about anything. Click on the deploy button to get started!
|
||||||
|
|
||||||
> **Note**
|
> [!NOTE]\
|
||||||
> Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58), we should be able to handle more than 5k requests and have fewer issues with downtime :grin:.
|
> Since [#58](https://github.com/anuraghazra/github-readme-stats/pull/58), we should be able to handle more than 5k requests and have fewer issues with downtime :grin:.
|
||||||
|
|
||||||
> **Note**
|
> [!NOTE]\
|
||||||
> If you are on the [Pro (i.e. paid)](https://vercel.com/pricing) Vercel plan, the [maxDuration](https://vercel.com/docs/concepts/projects/project-configuration#value-definition) value found in the [Vercel.json](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json) can be increased when your Vercel instance frequently times out during the card request. You are advised to keep this value lower than `30` seconds to prevent high memory usage.
|
> If you are on the [Pro (i.e. paid)](https://vercel.com/pricing) Vercel plan, the [maxDuration](https://vercel.com/docs/concepts/projects/project-configuration#value-definition) value found in the [Vercel.json](https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json) can be increased when your Vercel instance frequently times out during the card request. You are advised to keep this value lower than `30` seconds to prevent high memory usage.
|
||||||
|
|
||||||
[](https://vercel.com/import/project?template=https://github.com/anuraghazra/github-readme-stats)
|
[](https://vercel.com/import/project?template=https://github.com/anuraghazra/github-readme-stats)
|
||||||
@@ -684,7 +685,7 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme
|
|||||||
|
|
||||||
## On other platforms
|
## On other platforms
|
||||||
|
|
||||||
> **Warning**
|
> [!WARNING]\
|
||||||
> This way of using GRS is not officially supported and was added to cater to some particular use cases where Vercel could not be used (e.g. [#2341](https://github.com/anuraghazra/github-readme-stats/discussions/2341)). The support for this method, therefore, is limited.
|
> This way of using GRS is not officially supported and was added to cater to some particular use cases where Vercel could not be used (e.g. [#2341](https://github.com/anuraghazra/github-readme-stats/discussions/2341)). The support for this method, therefore, is limited.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ 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 repo The name of the repository.
|
* @param {module:@actions/github.Octokit} octokit The octokit client.
|
||||||
* @param reviewer The reviewer to filter by.
|
* @param {string} user The user name of the repository owner.
|
||||||
* @returns The open PRs.
|
* @param {string} repo The name of the repository.
|
||||||
|
* @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 = [];
|
||||||
@@ -88,8 +90,10 @@ 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 label The label to check for.
|
* @param {Object[]} pulls The pull requests to check.
|
||||||
|
* @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) => {
|
||||||
@@ -99,9 +103,10 @@ 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} days number of days.
|
* @param {number} staleDays 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(
|
||||||
@@ -122,6 +127,8 @@ 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} context Action context.
|
* @param {Object} ctx Action context.
|
||||||
* @returns {Object} Repository information.
|
* @returns {Object} Repository information.
|
||||||
*/
|
*/
|
||||||
export const getRepoInfo = (ctx) => {
|
export const getRepoInfo = (ctx) => {
|
||||||
|
|||||||
+21
-14
@@ -29,10 +29,10 @@ const FAIL_TEXT = `
|
|||||||
const THEME_CONTRIB_GUIDELINES = `
|
const THEME_CONTRIB_GUIDELINES = `
|
||||||
\rHi, thanks for the theme contribution. Please read our theme [contribution guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution).
|
\rHi, thanks for the theme contribution. Please read our theme [contribution guidelines](https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#themes-contribution).
|
||||||
|
|
||||||
\r> **Warning**
|
\r> [!WARNING]\
|
||||||
\r> 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.
|
\r> 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.
|
||||||
|
|
||||||
\r> **Note**
|
\r> [!NOTE]\
|
||||||
\r> Also, note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection, you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization).
|
\r> Also, note that if this theme is exclusively for your personal use, then instead of adding it to our theme collection, you can use card [customization options](https://github.com/anuraghazra/github-readme-stats#customization).
|
||||||
`;
|
`;
|
||||||
const COLOR_PROPS = {
|
const COLOR_PROPS = {
|
||||||
@@ -110,8 +110,9 @@ 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} repo Repository name.
|
|
||||||
* @param {string} owner Owner of the repository.
|
* @param {string} owner Owner of the repository.
|
||||||
|
* @param {string} repo Repository name.
|
||||||
|
* @param {string} commenter Comment author.
|
||||||
* @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) => {
|
||||||
@@ -151,7 +152,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.
|
||||||
* @return {string} The comment URL.
|
* @returns {string} The comment URL.
|
||||||
*/
|
*/
|
||||||
const upsertComment = async (
|
const upsertComment = async (
|
||||||
octokit,
|
octokit,
|
||||||
@@ -163,14 +164,14 @@ const upsertComment = async (
|
|||||||
) => {
|
) => {
|
||||||
let resp;
|
let resp;
|
||||||
if (commentId !== undefined) {
|
if (commentId !== undefined) {
|
||||||
resp = await octokit.issues.updateComment({
|
resp = await octokit.rest.issues.updateComment({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
comment_id: commentId,
|
comment_id: commentId,
|
||||||
body,
|
body,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
resp = await octokit.issues.createComment({
|
resp = await octokit.rest.issues.createComment({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
@@ -189,6 +190,7 @@ 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,
|
||||||
@@ -198,7 +200,7 @@ const addReview = async (
|
|||||||
reviewState,
|
reviewState,
|
||||||
reason,
|
reason,
|
||||||
) => {
|
) => {
|
||||||
await octokit.pulls.createReview({
|
await octokit.rest.pulls.createReview({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
pull_number: prNumber,
|
pull_number: prNumber,
|
||||||
@@ -215,9 +217,10 @@ 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.rest.issues.addLabels({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: prNumber,
|
issue_number: prNumber,
|
||||||
@@ -233,9 +236,10 @@ 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.rest.issues.removeLabel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: prNumber,
|
issue_number: prNumber,
|
||||||
@@ -252,9 +256,10 @@ 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.rest.pulls.get({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
pull_number: prNumber,
|
pull_number: prNumber,
|
||||||
@@ -359,6 +364,8 @@ 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 {
|
||||||
@@ -382,7 +389,7 @@ export const run = async () => {
|
|||||||
|
|
||||||
// Retrieve the PR diff and preview-theme comment.
|
// Retrieve the PR diff and preview-theme comment.
|
||||||
debug("Retrieve PR diff...");
|
debug("Retrieve PR diff...");
|
||||||
const res = await OCTOKIT.pulls.get({
|
const res = await OCTOKIT.rest.pulls.get({
|
||||||
owner: OWNER,
|
owner: OWNER,
|
||||||
repo: REPO,
|
repo: REPO,
|
||||||
pull_number: PULL_REQUEST_ID,
|
pull_number: PULL_REQUEST_ID,
|
||||||
@@ -451,7 +458,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) {
|
||||||
warning.push("Theme colors are missing");
|
warnings.push("Theme colors are missing");
|
||||||
invalidColors = true;
|
invalidColors = true;
|
||||||
} else {
|
} else {
|
||||||
const missingKeys = REQUIRED_COLOR_PROPS.filter(
|
const missingKeys = REQUIRED_COLOR_PROPS.filter(
|
||||||
@@ -544,8 +551,8 @@ export const run = async () => {
|
|||||||
\r${warnings.map((warning) => `- :warning: ${warning}.\n`).join("")}
|
\r${warnings.map((warning) => `- :warning: ${warning}.\n`).join("")}
|
||||||
|
|
||||||
\ntitle_color: <code>#${titleColor}</code> | icon_color: <code>#${iconColor}</code> | text_color: <code>#${textColor}</code> | bg_color: <code>#${bgColor}</code>${
|
\ntitle_color: <code>#${titleColor}</code> | icon_color: <code>#${iconColor}</code> | text_color: <code>#${textColor}</code> | bg_color: <code>#${bgColor}</code>${
|
||||||
borderColor ? ` | border_color: <code>#${borderColor}</code>` : ""
|
borderColor ? ` | border_color: <code>#${borderColor}</code>` : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
\r[Preview Link](${url})
|
\r[Preview Link](${url})
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ function log_normal_cdf(x) {
|
|||||||
* @param {number} params.commits Number of commits.
|
* @param {number} params.commits Number of commits.
|
||||||
* @param {number} params.prs The number of pull requests.
|
* @param {number} params.prs The number of pull requests.
|
||||||
* @param {number} params.issues The number of issues.
|
* @param {number} params.issues The number of issues.
|
||||||
|
* @param {number} params.reviews The number of reviews.
|
||||||
* @param {number} params.repos Total number of repos.
|
* @param {number} params.repos Total number of repos.
|
||||||
* @param {number} params.stars The number of stars.
|
* @param {number} params.stars The number of stars.
|
||||||
* @param {number} params.followers The number of followers.
|
* @param {number} params.followers The number of followers.
|
||||||
@@ -25,6 +26,8 @@ function calculateRank({
|
|||||||
commits,
|
commits,
|
||||||
prs,
|
prs,
|
||||||
issues,
|
issues,
|
||||||
|
reviews,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
repos, // unused
|
repos, // unused
|
||||||
stars,
|
stars,
|
||||||
followers,
|
followers,
|
||||||
@@ -35,6 +38,8 @@ function calculateRank({
|
|||||||
PRS_WEIGHT = 3;
|
PRS_WEIGHT = 3;
|
||||||
const ISSUES_MEDIAN = 25,
|
const ISSUES_MEDIAN = 25,
|
||||||
ISSUES_WEIGHT = 1;
|
ISSUES_WEIGHT = 1;
|
||||||
|
const REVIEWS_MEDIAN = 2,
|
||||||
|
REVIEWS_WEIGHT = 1;
|
||||||
const STARS_MEDIAN = 50,
|
const STARS_MEDIAN = 50,
|
||||||
STARS_WEIGHT = 4;
|
STARS_WEIGHT = 4;
|
||||||
const FOLLOWERS_MEDIAN = 10,
|
const FOLLOWERS_MEDIAN = 10,
|
||||||
@@ -44,6 +49,7 @@ function calculateRank({
|
|||||||
COMMITS_WEIGHT +
|
COMMITS_WEIGHT +
|
||||||
PRS_WEIGHT +
|
PRS_WEIGHT +
|
||||||
ISSUES_WEIGHT +
|
ISSUES_WEIGHT +
|
||||||
|
REVIEWS_WEIGHT +
|
||||||
STARS_WEIGHT +
|
STARS_WEIGHT +
|
||||||
FOLLOWERS_WEIGHT;
|
FOLLOWERS_WEIGHT;
|
||||||
|
|
||||||
@@ -55,13 +61,14 @@ function calculateRank({
|
|||||||
(COMMITS_WEIGHT * exponential_cdf(commits / COMMITS_MEDIAN) +
|
(COMMITS_WEIGHT * exponential_cdf(commits / COMMITS_MEDIAN) +
|
||||||
PRS_WEIGHT * exponential_cdf(prs / PRS_MEDIAN) +
|
PRS_WEIGHT * exponential_cdf(prs / PRS_MEDIAN) +
|
||||||
ISSUES_WEIGHT * exponential_cdf(issues / ISSUES_MEDIAN) +
|
ISSUES_WEIGHT * exponential_cdf(issues / ISSUES_MEDIAN) +
|
||||||
|
REVIEWS_WEIGHT * exponential_cdf(reviews / REVIEWS_MEDIAN) +
|
||||||
STARS_WEIGHT * log_normal_cdf(stars / STARS_MEDIAN) +
|
STARS_WEIGHT * log_normal_cdf(stars / STARS_MEDIAN) +
|
||||||
FOLLOWERS_WEIGHT * log_normal_cdf(followers / FOLLOWERS_MEDIAN)) /
|
FOLLOWERS_WEIGHT * log_normal_cdf(followers / FOLLOWERS_MEDIAN)) /
|
||||||
TOTAL_WEIGHT;
|
TOTAL_WEIGHT;
|
||||||
|
|
||||||
const level = LEVELS[THRESHOLDS.findIndex((t) => rank * 100 <= t)];
|
const level = LEVELS[THRESHOLDS.findIndex((t) => rank * 100 <= t)];
|
||||||
|
|
||||||
return { level: level, percentile: rank * 100 };
|
return { level, percentile: rank * 100 };
|
||||||
}
|
}
|
||||||
|
|
||||||
export { calculateRank };
|
export { calculateRank };
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ const ICON_SIZE = 16;
|
|||||||
* @returns {string} Icon with label SVG object.
|
* @returns {string} Icon with label SVG object.
|
||||||
*/
|
*/
|
||||||
const iconWithLabel = (icon, label, testid) => {
|
const iconWithLabel = (icon, label, testid) => {
|
||||||
if (label <= 0) return "";
|
if (typeof label === "number" && label <= 0) return "";
|
||||||
const iconSvg = `
|
const iconSvg = `
|
||||||
<svg
|
<svg
|
||||||
class="icon"
|
class="icon"
|
||||||
|
|||||||
+51
-18
@@ -3,6 +3,7 @@ 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,
|
||||||
@@ -16,6 +17,8 @@ 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.
|
||||||
@@ -30,7 +33,7 @@ const RANK_CARD_DEFAULT_WIDTH = 450;
|
|||||||
* @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
|
* @returns {string} The stats card text item SVG object.
|
||||||
*/
|
*/
|
||||||
const createTextNode = ({
|
const createTextNode = ({
|
||||||
icon,
|
icon,
|
||||||
@@ -74,11 +77,11 @@ const createTextNode = ({
|
|||||||
/**
|
/**
|
||||||
* Renders the stats card.
|
* Renders the stats card.
|
||||||
*
|
*
|
||||||
* @param {Partial<import('../fetchers/types').StatsData>} stats The stats data.
|
* @param {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,
|
||||||
@@ -216,8 +219,9 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
"de",
|
"de",
|
||||||
"nl",
|
"nl",
|
||||||
"zh-tw",
|
"zh-tw",
|
||||||
|
"uz",
|
||||||
];
|
];
|
||||||
const isLongLocale = longLocales.includes(locale);
|
const isLongLocale = locale ? longLocales.includes(locale) : false;
|
||||||
|
|
||||||
// filter out hidden stats defined by user & create the text nodes
|
// filter out hidden stats defined by user & create the text nodes
|
||||||
const statItems = Object.keys(STATS)
|
const statItems = Object.keys(STATS)
|
||||||
@@ -234,11 +238,18 @@ 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 : 150,
|
hide_rank ? 0 : statItems.length ? 150 : 180,
|
||||||
);
|
);
|
||||||
|
|
||||||
// the lower the user's percentile the better
|
// the lower the user's percentile the better
|
||||||
@@ -253,7 +264,13 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const calculateTextWidth = () => {
|
const calculateTextWidth = () => {
|
||||||
return measureText(custom_title ? custom_title : i18n.t("statcard.title"));
|
return measureText(
|
||||||
|
custom_title
|
||||||
|
? custom_title
|
||||||
|
: statItems.length
|
||||||
|
? i18n.t("statcard.title")
|
||||||
|
: i18n.t("statcard.ranktitle"),
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -261,7 +278,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 ? 16 + /* padding */ 1 : 0;
|
const iconWidth = show_icons && statItems.length ? 16 + /* padding */ 1 : 0;
|
||||||
const minCardWidth =
|
const minCardWidth =
|
||||||
(hide_rank
|
(hide_rank
|
||||||
? clampValue(
|
? clampValue(
|
||||||
@@ -269,17 +286,29 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
CARD_MIN_WIDTH,
|
CARD_MIN_WIDTH,
|
||||||
Infinity,
|
Infinity,
|
||||||
)
|
)
|
||||||
: RANK_CARD_MIN_WIDTH) + iconWidth;
|
: statItems.length
|
||||||
|
? RANK_CARD_MIN_WIDTH
|
||||||
|
: RANK_ONLY_CARD_MIN_WIDTH) + iconWidth;
|
||||||
const defaultCardWidth =
|
const defaultCardWidth =
|
||||||
(hide_rank ? CARD_DEFAULT_WIDTH : RANK_CARD_DEFAULT_WIDTH) + iconWidth;
|
(hide_rank
|
||||||
let width = isNaN(card_width) ? defaultCardWidth : card_width;
|
? CARD_DEFAULT_WIDTH
|
||||||
|
: statItems.length
|
||||||
|
? RANK_CARD_DEFAULT_WIDTH
|
||||||
|
: RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth;
|
||||||
|
let width = card_width
|
||||||
|
? isNaN(card_width)
|
||||||
|
? defaultCardWidth
|
||||||
|
: card_width
|
||||||
|
: defaultCardWidth;
|
||||||
if (width < minCardWidth) {
|
if (width < minCardWidth) {
|
||||||
width = minCardWidth;
|
width = minCardWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
const card = new Card({
|
const card = new Card({
|
||||||
customTitle: custom_title,
|
customTitle: custom_title,
|
||||||
defaultTitle: i18n.t("statcard.title"),
|
defaultTitle: statItems.length
|
||||||
|
? i18n.t("statcard.title")
|
||||||
|
: i18n.t("statcard.ranktitle"),
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
border_radius,
|
border_radius,
|
||||||
@@ -309,12 +338,16 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
* @returns {number} - Rank circle translation value.
|
* @returns {number} - Rank circle translation value.
|
||||||
*/
|
*/
|
||||||
const calculateRankXTranslation = () => {
|
const calculateRankXTranslation = () => {
|
||||||
const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70;
|
if (statItems.length) {
|
||||||
if (width > RANK_CARD_DEFAULT_WIDTH) {
|
const minXTranslation = RANK_CARD_MIN_WIDTH + iconWidth - 70;
|
||||||
const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2;
|
if (width > RANK_CARD_DEFAULT_WIDTH) {
|
||||||
return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH;
|
const xMaxExpansion = minXTranslation + (450 - minCardWidth) / 2;
|
||||||
|
return xMaxExpansion + width - RANK_CARD_DEFAULT_WIDTH;
|
||||||
|
} else {
|
||||||
|
return minXTranslation + (width - minCardWidth) / 2;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return minXTranslation + (width - minCardWidth) / 2;
|
return width / 2 + 20 - 10;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -323,8 +356,8 @@ const renderStatsCard = (stats = {}, options = {}) => {
|
|||||||
? ""
|
? ""
|
||||||
: `<g data-testid="rank-circle"
|
: `<g data-testid="rank-circle"
|
||||||
transform="translate(${calculateRankXTranslation()}, ${
|
transform="translate(${calculateRankXTranslation()}, ${
|
||||||
height / 2 - 50
|
height / 2 - 50
|
||||||
})">
|
})">
|
||||||
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
|
<circle class="rank-circle-rim" cx="-10" cy="8" r="40" />
|
||||||
<circle class="rank-circle" cx="-10" cy="8" r="40" />
|
<circle class="rank-circle" cx="-10" cy="8" r="40" />
|
||||||
<g class="rank-text">
|
<g class="rank-text">
|
||||||
|
|||||||
@@ -33,20 +33,20 @@ 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 {Object} Longest programming language object.
|
* @returns {{ name: string, size: number, color: string }} 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: null, color: "" },
|
{ name: "", size: 0, color: "" },
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert degrees to radians.
|
* Convert degrees to radians.
|
||||||
*
|
*
|
||||||
* @param {number} angleInDegrees Angle in degrees.
|
* @param {number} angleInDegrees Angle in degrees.
|
||||||
* @returns Angle in radians.
|
* @returns {number} Angle in radians.
|
||||||
*/
|
*/
|
||||||
const degreesToRadians = (angleInDegrees) => angleInDegrees * (Math.PI / 180.0);
|
const degreesToRadians = (angleInDegrees) => angleInDegrees * (Math.PI / 180.0);
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ const degreesToRadians = (angleInDegrees) => angleInDegrees * (Math.PI / 180.0);
|
|||||||
* Convert radians to degrees.
|
* Convert radians to degrees.
|
||||||
*
|
*
|
||||||
* @param {number} angleInRadians Angle in radians.
|
* @param {number} angleInRadians Angle in radians.
|
||||||
* @returns Angle in degrees.
|
* @returns {number} Angle in degrees.
|
||||||
*/
|
*/
|
||||||
const radiansToDegrees = (angleInRadians) => angleInRadians / (Math.PI / 180.0);
|
const radiansToDegrees = (angleInRadians) => angleInRadians / (Math.PI / 180.0);
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ const createProgressTextNode = ({ width, color, name, progress, index }) => {
|
|||||||
* @param {object} props Function properties.
|
* @param {object} props Function properties.
|
||||||
* @param {Lang} props.lang Programming language object.
|
* @param {Lang} props.lang Programming language object.
|
||||||
* @param {number} props.totalSize Total size of all languages.
|
* @param {number} props.totalSize Total size of all languages.
|
||||||
* @param {boolean} props.hideProgress Whether to hide percentage.
|
* @param {boolean=} props.hideProgress Whether to hide percentage.
|
||||||
* @param {number} props.index Index of the programming language.
|
* @param {number} props.index Index of the programming language.
|
||||||
* @returns {string} Compact layout programming language SVG node.
|
* @returns {string} Compact layout programming language SVG node.
|
||||||
*/
|
*/
|
||||||
@@ -259,7 +259,7 @@ const createCompactLangNode = ({ lang, totalSize, hideProgress, index }) => {
|
|||||||
* @param {object} props Function properties.
|
* @param {object} props Function properties.
|
||||||
* @param {Lang[]} props.langs Array of programming languages.
|
* @param {Lang[]} props.langs Array of programming languages.
|
||||||
* @param {number} props.totalSize Total size of all languages.
|
* @param {number} props.totalSize Total size of all languages.
|
||||||
* @param {boolean} props.hideProgress Whether to hide percentage.
|
* @param {boolean=} props.hideProgress Whether to hide percentage.
|
||||||
* @returns {string} Programming languages SVG node.
|
* @returns {string} Programming languages SVG node.
|
||||||
*/
|
*/
|
||||||
const createLanguageTextNode = ({ langs, totalSize, hideProgress }) => {
|
const createLanguageTextNode = ({ langs, totalSize, hideProgress }) => {
|
||||||
@@ -344,7 +344,7 @@ const renderNormalLayout = (langs, width, totalLanguageSize) => {
|
|||||||
* @param {Lang[]} langs Array of programming languages.
|
* @param {Lang[]} langs Array of programming languages.
|
||||||
* @param {number} width Card width.
|
* @param {number} width Card width.
|
||||||
* @param {number} totalLanguageSize Total size of all languages.
|
* @param {number} totalLanguageSize Total size of all languages.
|
||||||
* @param {boolean} hideProgress Whether to hide progress bar.
|
* @param {boolean=} hideProgress Whether to hide progress bar.
|
||||||
* @returns {string} Compact layout card SVG object.
|
* @returns {string} Compact layout card SVG object.
|
||||||
*/
|
*/
|
||||||
const renderCompactLayout = (langs, width, totalLanguageSize, hideProgress) => {
|
const renderCompactLayout = (langs, width, totalLanguageSize, hideProgress) => {
|
||||||
@@ -392,7 +392,7 @@ const renderCompactLayout = (langs, width, totalLanguageSize, hideProgress) => {
|
|||||||
${createLanguageTextNode({
|
${createLanguageTextNode({
|
||||||
langs,
|
langs,
|
||||||
totalSize: totalLanguageSize,
|
totalSize: totalLanguageSize,
|
||||||
hideProgress: hideProgress,
|
hideProgress,
|
||||||
})}
|
})}
|
||||||
</g>
|
</g>
|
||||||
`;
|
`;
|
||||||
@@ -738,11 +738,13 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
|||||||
hide,
|
hide,
|
||||||
);
|
);
|
||||||
|
|
||||||
let width = isNaN(card_width)
|
let width = card_width
|
||||||
? DEFAULT_CARD_WIDTH
|
? isNaN(card_width)
|
||||||
: card_width < MIN_CARD_WIDTH
|
? DEFAULT_CARD_WIDTH
|
||||||
? MIN_CARD_WIDTH
|
: card_width < MIN_CARD_WIDTH
|
||||||
: card_width;
|
? MIN_CARD_WIDTH
|
||||||
|
: card_width
|
||||||
|
: DEFAULT_CARD_WIDTH;
|
||||||
let height = calculateNormalLayoutHeight(langs.length);
|
let height = calculateNormalLayoutHeight(langs.length);
|
||||||
|
|
||||||
// returns theme based colors with proper overrides and defaults
|
// returns theme based colors with proper overrides and defaults
|
||||||
|
|||||||
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" | "progress";
|
type RankIcon = "default" | "github" | "percentile";
|
||||||
|
|
||||||
export type CommonOptions = {
|
export type CommonOptions = {
|
||||||
title_color: string;
|
title_color: string;
|
||||||
|
|||||||
+15
-15
@@ -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.
|
||||||
* @return {string} No coding activity SVG node string.
|
* @returns {string} No coding activity SVG node string.
|
||||||
*/
|
*/
|
||||||
const noCodingActivityNode = ({ color, text }) => {
|
const noCodingActivityNode = ({ color, text }) => {
|
||||||
return `
|
return `
|
||||||
@@ -36,16 +36,20 @@ const noCodingActivityNode = ({ color, text }) => {
|
|||||||
`;
|
`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {import('../fetchers/types').WakaTimeLang} WakaTimeLang
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create compact WakaTime layout.
|
* Create compact WakaTime layout.
|
||||||
*
|
*
|
||||||
* @param {Object} args The function arguments.
|
* @param {Object} args The function arguments.
|
||||||
* @param {import("../fetchers/types").WakaTimeLang} args.lang The languages array.
|
* @param {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.
|
||||||
|
* @returns {string} The compact layout language SVG node.
|
||||||
*/
|
*/
|
||||||
const createCompactLangNode = ({ lang, totalSize, x, y }) => {
|
const createCompactLangNode = ({ lang, x, y }) => {
|
||||||
const color = languageColors[lang.name] || "#858585";
|
const color = languageColors[lang.name] || "#858585";
|
||||||
|
|
||||||
return `
|
return `
|
||||||
@@ -62,26 +66,23 @@ const createCompactLangNode = ({ lang, totalSize, x, y }) => {
|
|||||||
* Create WakaTime language text node item.
|
* Create WakaTime language text node item.
|
||||||
*
|
*
|
||||||
* @param {Object} args The function arguments.
|
* @param {Object} args The function arguments.
|
||||||
* @param {import("../fetchers/types").WakaTimeLang[]} args.langs The language objects.
|
* @param {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.
|
||||||
|
* @returns {string[]} The language text node items.
|
||||||
*/
|
*/
|
||||||
const createLanguageTextNode = ({ langs, totalSize, x, y }) => {
|
const createLanguageTextNode = ({ langs, 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,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -98,6 +99,7 @@ const createLanguageTextNode = ({ langs, totalSize, x, y }) => {
|
|||||||
* @param {boolean} args.hideProgress Whether to hide the progress bar.
|
* @param {boolean} args.hideProgress Whether to hide the progress bar.
|
||||||
* @param {string} args.progressBarColor The color of the progress bar.
|
* @param {string} args.progressBarColor The color of the progress bar.
|
||||||
* @param {string} args.progressBarBackgroundColor The color of the progress bar background.
|
* @param {string} args.progressBarBackgroundColor The color of the progress bar background.
|
||||||
|
* @returns {string} The text SVG node.
|
||||||
*/
|
*/
|
||||||
const createTextNode = ({
|
const createTextNode = ({
|
||||||
id,
|
id,
|
||||||
@@ -142,8 +144,8 @@ const createTextNode = ({
|
|||||||
* Recalculating percentages so that, compact layout's progress bar does not break when
|
* Recalculating percentages so that, compact layout's progress bar does not break when
|
||||||
* hiding languages.
|
* hiding languages.
|
||||||
*
|
*
|
||||||
* @param {import("../fetchers/types").WakaTimeLang[]} languages The languages array.
|
* @param {WakaTimeLang[]} languages The languages array.
|
||||||
* @return {void} The recalculated languages array.
|
* @returns {void} The recalculated languages array.
|
||||||
*/
|
*/
|
||||||
const recalculatePercentages = (languages) => {
|
const recalculatePercentages = (languages) => {
|
||||||
const totalSum = languages.reduce(
|
const totalSum = languages.reduce(
|
||||||
@@ -274,10 +276,8 @@ 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
|
||||||
@@ -298,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,
|
||||||
|
|||||||
+23
-6
@@ -54,12 +54,18 @@ class Card {
|
|||||||
this.a11yDesc = "";
|
this.a11yDesc = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
disableAnimations() {
|
disableAnimations() {
|
||||||
this.animations = false;
|
this.animations = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {{title: string, desc: string}} prop
|
* @param {Object} props The props object.
|
||||||
|
* @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;
|
||||||
@@ -67,21 +73,24 @@ class Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} value
|
* @param {string} value The CSS to add to the card.
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
setCSS(value) {
|
setCSS(value) {
|
||||||
this.css = value;
|
this.css = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {boolean} value
|
* @param {boolean} value Whether to hide the border or not.
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
setHideBorder(value) {
|
setHideBorder(value) {
|
||||||
this.hideBorder = value;
|
this.hideBorder = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {boolean} value
|
* @param {boolean} value Whether to hide the title or not.
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
setHideTitle(value) {
|
setHideTitle(value) {
|
||||||
this.hideTitle = value;
|
this.hideTitle = value;
|
||||||
@@ -91,12 +100,16 @@ class Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} text
|
* @param {string} text The title to set.
|
||||||
|
* @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
|
||||||
@@ -133,6 +146,9 @@ class Card {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {string} The rendered card gradient.
|
||||||
|
*/
|
||||||
renderGradient() {
|
renderGradient() {
|
||||||
if (typeof this.colors.bgColor !== "object") return "";
|
if (typeof this.colors.bgColor !== "object") return "";
|
||||||
|
|
||||||
@@ -156,7 +172,8 @@ class Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} body
|
* @param {string} body The inner body of the card.
|
||||||
|
* @returns {string} The rendered card.
|
||||||
*/
|
*/
|
||||||
render(body) {
|
render(body) {
|
||||||
return `
|
return `
|
||||||
|
|||||||
+2
-8
@@ -15,7 +15,7 @@ const icons = {
|
|||||||
* Get rank icon
|
* Get rank icon
|
||||||
*
|
*
|
||||||
* @param {string} rankIcon - The rank icon type.
|
* @param {string} rankIcon - The rank icon type.
|
||||||
* @param {number} rankLevel - The rank level.
|
* @param {string} rankLevel - The rank level.
|
||||||
* @param {number} percentile - The rank percentile.
|
* @param {number} percentile - The rank percentile.
|
||||||
* @returns {string} - The SVG code of the rank icon
|
* @returns {string} - The SVG code of the rank icon
|
||||||
*/
|
*/
|
||||||
@@ -36,19 +36,13 @@ 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,6 +217,7 @@
|
|||||||
"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",
|
||||||
@@ -517,6 +518,8 @@
|
|||||||
"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",
|
||||||
@@ -561,7 +564,6 @@
|
|||||||
"q": "#0040cd",
|
"q": "#0040cd",
|
||||||
"reStructuredText": "#141414",
|
"reStructuredText": "#141414",
|
||||||
"sed": "#64b970",
|
"sed": "#64b970",
|
||||||
"wdl": "#42f1f4",
|
|
||||||
"wisp": "#7582D1",
|
"wisp": "#7582D1",
|
||||||
"xBase": "#403a40"
|
"xBase": "#403a40"
|
||||||
}
|
}
|
||||||
@@ -9,11 +9,10 @@ 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[]} retryerParams Object that contains the createTextNode parameters.
|
* @param {object[]} fetcher The fetcher function.
|
||||||
* @param {object[]} retryerParams.fetcher The fetcher function.
|
* @param {object[]} variables Object with arguments to pass to the fetcher function.
|
||||||
* @param {object[]} retryerParams.variables Object with arguments to pass to the fetcher function.
|
* @param {number} retries How many times to retry.
|
||||||
* @param {number} retryerParams.retries How many times to retry.
|
* @returns {Promise<T>} The response from the fetcher function.
|
||||||
* @returns Promise<retryer>
|
|
||||||
*/
|
*/
|
||||||
const retryer = async (fetcher, variables, retries = 0) => {
|
const retryer = async (fetcher, variables, retries = 0) => {
|
||||||
if (retries > RETRIES) {
|
if (retries > RETRIES) {
|
||||||
|
|||||||
+41
-18
@@ -132,7 +132,7 @@ const isValidGradient = (colors) => {
|
|||||||
* Retrieves a gradient if color has more than one valid hex codes else a single color.
|
* Retrieves a gradient if color has more than one valid hex codes else a single color.
|
||||||
*
|
*
|
||||||
* @param {string} color The color to parse.
|
* @param {string} color The color to parse.
|
||||||
* @param {string} fallbackColor The fallback color.
|
* @param {string | string[]} fallbackColor The fallback color.
|
||||||
* @returns {string | string[]} The gradient or color.
|
* @returns {string | string[]} The gradient or color.
|
||||||
*/
|
*/
|
||||||
const fallbackColor = (color, fallbackColor) => {
|
const fallbackColor = (color, fallbackColor) => {
|
||||||
@@ -173,8 +173,8 @@ const request = (data, headers) => {
|
|||||||
* @param {object} props Function properties.
|
* @param {object} props Function properties.
|
||||||
* @param {string[]} props.items Array of items to layout.
|
* @param {string[]} props.items Array of items to layout.
|
||||||
* @param {number} props.gap Gap between items.
|
* @param {number} props.gap Gap between items.
|
||||||
* @param {number[]?=} props.sizes Array of sizes for each item.
|
* @param {"column" | "row"=} props.direction Direction to layout items.
|
||||||
* @param {"column" | "row"?=} props.direction Direction to layout items.
|
* @param {number[]=} props.sizes Array of sizes for each item.
|
||||||
* @returns {string[]} Array of items with proper layout.
|
* @returns {string[]} Array of items with proper layout.
|
||||||
*/
|
*/
|
||||||
const flexLayout = ({ items, gap, direction, sizes = [] }) => {
|
const flexLayout = ({ items, gap, direction, sizes = [] }) => {
|
||||||
@@ -191,18 +191,31 @@ const flexLayout = ({ items, gap, direction, sizes = [] }) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object containing card colors.
|
||||||
|
* @typedef {{
|
||||||
|
* titleColor: string | string[];
|
||||||
|
* iconColor: string | string[];
|
||||||
|
* textColor: string | string[];
|
||||||
|
* bgColor: string | string[];
|
||||||
|
* borderColor: string | string[];
|
||||||
|
* ringColor: string | string[];
|
||||||
|
* }} CardColors
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns theme based colors with proper overrides and defaults.
|
* Returns theme based colors with proper overrides and defaults.
|
||||||
*
|
*
|
||||||
* @param {Object} args Function arguments.
|
* @param {Object} args Function arguments.
|
||||||
* @param {string} args.title_color Card title color.
|
* @param {string=} args.title_color Card title color.
|
||||||
* @param {string} args.text_color Card text color.
|
* @param {string=} args.text_color Card text color.
|
||||||
* @param {string} args.icon_color Card icon color.
|
* @param {string=} args.icon_color Card icon color.
|
||||||
* @param {string} args.bg_color Card background color.
|
* @param {string=} args.bg_color Card background color.
|
||||||
* @param {string} args.border_color Card border color.
|
* @param {string=} args.border_color Card border color.
|
||||||
* @param {string} args.ring_color Card ring color.
|
* @param {string=} args.ring_color Card ring color.
|
||||||
* @param {string} args.theme Card theme.
|
* @param {string=} args.theme Card theme.
|
||||||
* @param {string} args.fallbackTheme Fallback theme.
|
* @param {string=} args.fallbackTheme Fallback theme.
|
||||||
|
* @returns {CardColors} Card colors.
|
||||||
*/
|
*/
|
||||||
const getCardColors = ({
|
const getCardColors = ({
|
||||||
title_color,
|
title_color,
|
||||||
@@ -333,8 +346,10 @@ class CustomError extends Error {
|
|||||||
*/
|
*/
|
||||||
class MissingParamError extends Error {
|
class MissingParamError extends Error {
|
||||||
/**
|
/**
|
||||||
* @param {string[]} missedParams
|
* Missing query parameter error constructor.
|
||||||
* @param {string?=} secondaryMessage
|
*
|
||||||
|
* @param {string[]} missedParams An array of missing parameters names.
|
||||||
|
* @param {string=} secondaryMessage Optional secondary message to display.
|
||||||
*/
|
*/
|
||||||
constructor(missedParams, secondaryMessage) {
|
constructor(missedParams, secondaryMessage) {
|
||||||
const msg = `Missing params ${missedParams
|
const msg = `Missing params ${missedParams
|
||||||
@@ -388,7 +403,12 @@ const measureText = (str, fontSize = 10) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @param {string} name */
|
/**
|
||||||
|
* Lowercase and trim string.
|
||||||
|
*
|
||||||
|
* @param {string} name String to lowercase and trim.
|
||||||
|
* @returns {string} Lowercased and trimmed string.
|
||||||
|
*/
|
||||||
const lowercaseTrim = (name) => name.toLowerCase().trim();
|
const lowercaseTrim = (name) => name.toLowerCase().trim();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -404,9 +424,11 @@ const chunkArray = (arr, perChunk) => {
|
|||||||
const chunkIndex = Math.floor(index / perChunk);
|
const chunkIndex = Math.floor(index / perChunk);
|
||||||
|
|
||||||
if (!resultArray[chunkIndex]) {
|
if (!resultArray[chunkIndex]) {
|
||||||
|
// @ts-ignore
|
||||||
resultArray[chunkIndex] = []; // start a new chunk
|
resultArray[chunkIndex] = []; // start a new chunk
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
resultArray[chunkIndex].push(item);
|
resultArray[chunkIndex].push(item);
|
||||||
|
|
||||||
return resultArray;
|
return resultArray;
|
||||||
@@ -427,10 +449,11 @@ const parseEmojis = (str) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get diff in minutes
|
* Get diff in minutes between two dates.
|
||||||
* @param {Date} d1
|
*
|
||||||
* @param {Date} d2
|
* @param {Date} d1 First date.
|
||||||
* @returns {number}
|
* @param {Date} d2 Second date.
|
||||||
|
* @returns {number} Number of minutes between the two dates.
|
||||||
*/
|
*/
|
||||||
const dateDiff = (d1, d2) => {
|
const dateDiff = (d1, d2) => {
|
||||||
const date1 = new Date(d1);
|
const date1 = new Date(d1);
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ const fetchStats = async (
|
|||||||
all_commits: include_all_commits,
|
all_commits: include_all_commits,
|
||||||
commits: stats.totalCommits,
|
commits: stats.totalCommits,
|
||||||
prs: stats.totalPRs,
|
prs: stats.totalPRs,
|
||||||
|
reviews: stats.totalReviews,
|
||||||
issues: stats.totalIssues,
|
issues: stats.totalIssues,
|
||||||
repos: user.repositories.totalCount,
|
repos: user.repositories.totalCount,
|
||||||
stars: stats.totalStars,
|
stars: stats.totalStars,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
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,4 +1,5 @@
|
|||||||
// @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.
|
||||||
*
|
*
|
||||||
@@ -75,6 +76,7 @@ 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,
|
||||||
|
|||||||
+47
-4
@@ -1,11 +1,14 @@
|
|||||||
|
// @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 {string} name The name of the locale.
|
* @param {object} props Function arguments.
|
||||||
* @param {string} apostrophe Whether to use apostrophe or not.
|
* @param {string} props.name The name of the locale.
|
||||||
* @returns {Object} The locales object.
|
* @param {string} props.apostrophe Whether to use apostrophe or not.
|
||||||
|
* @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.
|
||||||
*/
|
*/
|
||||||
@@ -43,6 +46,37 @@ 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)",
|
||||||
@@ -204,7 +238,7 @@ const statCardLocales = ({ name, apostrophe }) => {
|
|||||||
"zh-tw": "审查的 PR 总数",
|
"zh-tw": "审查的 PR 总数",
|
||||||
cs: "Celkový počet PR",
|
cs: "Celkový počet PR",
|
||||||
de: "Insgesamt überprüfte PRs",
|
de: "Insgesamt überprüfte PRs",
|
||||||
en: "Total PRs reviewed",
|
en: "Total PRs Reviewed",
|
||||||
bn: "সর্বমোট পুনরালোচনা করা PR",
|
bn: "সর্বমোট পুনরালোচনা করা PR",
|
||||||
es: "PR totales revisados",
|
es: "PR totales revisados",
|
||||||
fr: "Nombre total de PR examinés",
|
fr: "Nombre total de PR examinés",
|
||||||
@@ -319,6 +353,7 @@ const repoCardLocales = {
|
|||||||
sk: "Šablóna",
|
sk: "Šablóna",
|
||||||
tr: "Şablon",
|
tr: "Şablon",
|
||||||
pl: "Szablony",
|
pl: "Szablony",
|
||||||
|
uz: "Shablon",
|
||||||
vi: "Mẫu",
|
vi: "Mẫu",
|
||||||
se: "Mall",
|
se: "Mall",
|
||||||
},
|
},
|
||||||
@@ -349,6 +384,7 @@ const repoCardLocales = {
|
|||||||
sk: "Archivované",
|
sk: "Archivované",
|
||||||
tr: "Arşiv",
|
tr: "Arşiv",
|
||||||
pl: "Zarchiwizowano",
|
pl: "Zarchiwizowano",
|
||||||
|
uz: "Arxivlangan",
|
||||||
vi: "Đã Lưu Trữ",
|
vi: "Đã Lưu Trữ",
|
||||||
se: "Arkiverade",
|
se: "Arkiverade",
|
||||||
},
|
},
|
||||||
@@ -382,6 +418,7 @@ const langCardLocales = {
|
|||||||
sk: "Najviac používané jazyky",
|
sk: "Najviac používané jazyky",
|
||||||
tr: "En Çok Kullanılan Diller",
|
tr: "En Çok Kullanılan Diller",
|
||||||
pl: "Najczęściej używane języki",
|
pl: "Najczęściej używane języki",
|
||||||
|
uz: "Eng koʻp ishlatiladigan tillar",
|
||||||
vi: "Ngôn Ngữ Thường Sử Dụng",
|
vi: "Ngôn Ngữ Thường Sử Dụng",
|
||||||
se: "Mest använda språken",
|
se: "Mest använda språken",
|
||||||
},
|
},
|
||||||
@@ -412,6 +449,7 @@ const langCardLocales = {
|
|||||||
sk: "Žiadne údaje o jazykoch.",
|
sk: "Žiadne údaje o jazykoch.",
|
||||||
tr: "Dil verisi yok.",
|
tr: "Dil verisi yok.",
|
||||||
pl: "Brak danych dotyczących języków.",
|
pl: "Brak danych dotyczących języków.",
|
||||||
|
uz: "Til haqida ma'lumot yo'q.",
|
||||||
vi: "Không có dữ liệu ngôn ngữ.",
|
vi: "Không có dữ liệu ngôn ngữ.",
|
||||||
se: "Inga språkdata.",
|
se: "Inga språkdata.",
|
||||||
},
|
},
|
||||||
@@ -445,6 +483,7 @@ const wakatimeCardLocales = {
|
|||||||
sk: "Wakatime štatistika",
|
sk: "Wakatime štatistika",
|
||||||
tr: "Waketime İstatistikler",
|
tr: "Waketime İstatistikler",
|
||||||
pl: "Statystyki Wakatime",
|
pl: "Statystyki Wakatime",
|
||||||
|
uz: "Wakatime statistikasi",
|
||||||
vi: "Thống Kê Wakatime",
|
vi: "Thống Kê Wakatime",
|
||||||
se: "Wakatime statistik",
|
se: "Wakatime statistik",
|
||||||
},
|
},
|
||||||
@@ -475,6 +514,7 @@ const wakatimeCardLocales = {
|
|||||||
sk: "Minulý rok",
|
sk: "Minulý rok",
|
||||||
tr: "Geçen yıl",
|
tr: "Geçen yıl",
|
||||||
pl: "W zeszłym roku",
|
pl: "W zeszłym roku",
|
||||||
|
uz: "O'tgan yil",
|
||||||
vi: "Năm ngoái",
|
vi: "Năm ngoái",
|
||||||
se: "Förra året",
|
se: "Förra året",
|
||||||
},
|
},
|
||||||
@@ -505,6 +545,7 @@ const wakatimeCardLocales = {
|
|||||||
sk: "Posledných 7 dní",
|
sk: "Posledných 7 dní",
|
||||||
tr: "Son 7 gün",
|
tr: "Son 7 gün",
|
||||||
pl: "Ostatnie 7 dni",
|
pl: "Ostatnie 7 dni",
|
||||||
|
uz: "O'tgan 7 kun",
|
||||||
vi: "7 ngày qua",
|
vi: "7 ngày qua",
|
||||||
se: "Senaste 7 dagarna",
|
se: "Senaste 7 dagarna",
|
||||||
},
|
},
|
||||||
@@ -535,6 +576,7 @@ const wakatimeCardLocales = {
|
|||||||
sk: "Profil používateľa Wakatime nie je verejný",
|
sk: "Profil používateľa Wakatime nie je verejný",
|
||||||
tr: "Wakatime kullanıcı profili herkese açık değil",
|
tr: "Wakatime kullanıcı profili herkese açık değil",
|
||||||
pl: "Profil użytkownika Wakatime nie jest publiczny",
|
pl: "Profil użytkownika Wakatime nie jest publiczny",
|
||||||
|
uz: "Wakatime foydalanuvchi profili ochiq emas",
|
||||||
vi: "Hồ sơ người dùng Wakatime không công khai",
|
vi: "Hồ sơ người dùng Wakatime không công khai",
|
||||||
se: "Wakatime användarprofil inte offentlig",
|
se: "Wakatime användarprofil inte offentlig",
|
||||||
},
|
},
|
||||||
@@ -567,6 +609,7 @@ const wakatimeCardLocales = {
|
|||||||
sk: "Používateľ neposkytuje verejne podrobné štatistiky kódu",
|
sk: "Používateľ neposkytuje verejne podrobné štatistiky kódu",
|
||||||
tr: "Kullanıcı ayrıntılı kod istatistiklerini herkese açık olarak paylaşmıyor",
|
tr: "Kullanıcı ayrıntılı kod istatistiklerini herkese açık olarak paylaşmıyor",
|
||||||
pl: "Użytkownik nie udostępnia publicznie szczegółowych statystyk kodu",
|
pl: "Użytkownik nie udostępnia publicznie szczegółowych statystyk kodu",
|
||||||
|
uz: "Foydalanuvchi umumiy ko`d statistikasini ochiq ravishda almashmaydi",
|
||||||
vi: "Người dùng không chia sẻ thống kê mã chi tiết công khai",
|
vi: "Người dùng không chia sẻ thống kê mã chi tiết công khai",
|
||||||
se: "Användaren delar inte offentligt detaljerad kodstatistik",
|
se: "Användaren delar inte offentligt detaljerad kodstatistik",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ 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",
|
||||||
@@ -23,6 +24,7 @@ stats.rank = calculateRank({
|
|||||||
all_commits: false,
|
all_commits: false,
|
||||||
commits: stats.totalCommits,
|
commits: stats.totalCommits,
|
||||||
prs: stats.totalPRs,
|
prs: stats.totalPRs,
|
||||||
|
reviews: stats.totalReviews,
|
||||||
issues: stats.totalIssues,
|
issues: stats.totalIssues,
|
||||||
repos: 1,
|
repos: 1,
|
||||||
stars: stats.totalStars,
|
stars: stats.totalStars,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
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", () => {
|
||||||
@@ -9,6 +10,7 @@ describe("Test calculateRank", () => {
|
|||||||
commits: 0,
|
commits: 0,
|
||||||
prs: 0,
|
prs: 0,
|
||||||
issues: 0,
|
issues: 0,
|
||||||
|
reviews: 0,
|
||||||
repos: 0,
|
repos: 0,
|
||||||
stars: 0,
|
stars: 0,
|
||||||
followers: 0,
|
followers: 0,
|
||||||
@@ -23,11 +25,12 @@ describe("Test calculateRank", () => {
|
|||||||
commits: 125,
|
commits: 125,
|
||||||
prs: 25,
|
prs: 25,
|
||||||
issues: 10,
|
issues: 10,
|
||||||
|
reviews: 5,
|
||||||
repos: 0,
|
repos: 0,
|
||||||
stars: 25,
|
stars: 25,
|
||||||
followers: 5,
|
followers: 5,
|
||||||
}),
|
}),
|
||||||
).toStrictEqual({ level: "B-", percentile: 69.333868386557 });
|
).toStrictEqual({ level: "B-", percentile: 65.02918514848255 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("median user gets B+ rank", () => {
|
it("median user gets B+ rank", () => {
|
||||||
@@ -37,11 +40,12 @@ describe("Test calculateRank", () => {
|
|||||||
commits: 250,
|
commits: 250,
|
||||||
prs: 50,
|
prs: 50,
|
||||||
issues: 25,
|
issues: 25,
|
||||||
|
reviews: 10,
|
||||||
repos: 0,
|
repos: 0,
|
||||||
stars: 50,
|
stars: 50,
|
||||||
followers: 10,
|
followers: 10,
|
||||||
}),
|
}),
|
||||||
).toStrictEqual({ level: "B+", percentile: 50 });
|
).toStrictEqual({ level: "B+", percentile: 46.09375 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("average user gets B+ rank (include_all_commits)", () => {
|
it("average user gets B+ rank (include_all_commits)", () => {
|
||||||
@@ -51,11 +55,12 @@ describe("Test calculateRank", () => {
|
|||||||
commits: 1000,
|
commits: 1000,
|
||||||
prs: 50,
|
prs: 50,
|
||||||
issues: 25,
|
issues: 25,
|
||||||
|
reviews: 10,
|
||||||
repos: 0,
|
repos: 0,
|
||||||
stars: 50,
|
stars: 50,
|
||||||
followers: 10,
|
followers: 10,
|
||||||
}),
|
}),
|
||||||
).toStrictEqual({ level: "B+", percentile: 50 });
|
).toStrictEqual({ level: "B+", percentile: 46.09375 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("advanced user gets A rank", () => {
|
it("advanced user gets A rank", () => {
|
||||||
@@ -65,11 +70,12 @@ describe("Test calculateRank", () => {
|
|||||||
commits: 500,
|
commits: 500,
|
||||||
prs: 100,
|
prs: 100,
|
||||||
issues: 50,
|
issues: 50,
|
||||||
|
reviews: 20,
|
||||||
repos: 0,
|
repos: 0,
|
||||||
stars: 200,
|
stars: 200,
|
||||||
followers: 40,
|
followers: 40,
|
||||||
}),
|
}),
|
||||||
).toStrictEqual({ level: "A", percentile: 22.72727272727273 });
|
).toStrictEqual({ level: "A", percentile: 20.841471354166664 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("expert user gets A+ rank", () => {
|
it("expert user gets A+ rank", () => {
|
||||||
@@ -79,11 +85,12 @@ describe("Test calculateRank", () => {
|
|||||||
commits: 1000,
|
commits: 1000,
|
||||||
prs: 200,
|
prs: 200,
|
||||||
issues: 100,
|
issues: 100,
|
||||||
|
reviews: 40,
|
||||||
repos: 0,
|
repos: 0,
|
||||||
stars: 800,
|
stars: 800,
|
||||||
followers: 160,
|
followers: 160,
|
||||||
}),
|
}),
|
||||||
).toStrictEqual({ level: "A+", percentile: 6.082887700534744 });
|
).toStrictEqual({ level: "A+", percentile: 5.575988339442828 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("sindresorhus gets S rank", () => {
|
it("sindresorhus gets S rank", () => {
|
||||||
@@ -93,10 +100,11 @@ describe("Test calculateRank", () => {
|
|||||||
commits: 1300,
|
commits: 1300,
|
||||||
prs: 1500,
|
prs: 1500,
|
||||||
issues: 4500,
|
issues: 4500,
|
||||||
|
reviews: 1000,
|
||||||
repos: 0,
|
repos: 0,
|
||||||
stars: 600000,
|
stars: 600000,
|
||||||
followers: 50000,
|
followers: 50000,
|
||||||
}),
|
}),
|
||||||
).toStrictEqual({ level: "S", percentile: 0.49947889605312934 });
|
).toStrictEqual({ level: "S", percentile: 0.4578556547153667 });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ 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,25 +4,26 @@
|
|||||||
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";
|
||||||
const STATS_DATA = {
|
const STATS_DATA = {
|
||||||
name: "Cateline Mnemosyne",
|
name: "Cateline Mnemosyne",
|
||||||
totalPRs: 2,
|
totalPRs: 2,
|
||||||
|
totalReviews: 0,
|
||||||
totalCommits: 8,
|
totalCommits: 8,
|
||||||
totalIssues: 1,
|
totalIssues: 1,
|
||||||
totalStars: 1,
|
totalStars: 1,
|
||||||
contributedTo: 1,
|
contributedTo: 1,
|
||||||
rank: {
|
rank: {
|
||||||
level: "C",
|
level: "C",
|
||||||
percentile: 97.89377603631637,
|
percentile: 98.06929469995667,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -108,7 +109,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);
|
||||||
}, 7000);
|
}, 15000);
|
||||||
|
|
||||||
test("retrieve language card", async () => {
|
test("retrieve language card", async () => {
|
||||||
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
expect(VERCEL_PREVIEW_URL).toBeDefined();
|
||||||
@@ -133,7 +134,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 +154,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 +176,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,6 +2,7 @@ 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,6 +3,7 @@ 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 = {
|
||||||
@@ -107,6 +108,7 @@ describe("Test fetchStats", () => {
|
|||||||
all_commits: false,
|
all_commits: false,
|
||||||
commits: 100,
|
commits: 100,
|
||||||
prs: 300,
|
prs: 300,
|
||||||
|
reviews: 50,
|
||||||
issues: 200,
|
issues: 200,
|
||||||
repos: 5,
|
repos: 5,
|
||||||
stars: 300,
|
stars: 300,
|
||||||
@@ -140,6 +142,7 @@ describe("Test fetchStats", () => {
|
|||||||
all_commits: false,
|
all_commits: false,
|
||||||
commits: 100,
|
commits: 100,
|
||||||
prs: 300,
|
prs: 300,
|
||||||
|
reviews: 50,
|
||||||
issues: 200,
|
issues: 200,
|
||||||
repos: 5,
|
repos: 5,
|
||||||
stars: 300,
|
stars: 300,
|
||||||
@@ -179,6 +182,7 @@ describe("Test fetchStats", () => {
|
|||||||
all_commits: true,
|
all_commits: true,
|
||||||
commits: 1000,
|
commits: 1000,
|
||||||
prs: 300,
|
prs: 300,
|
||||||
|
reviews: 50,
|
||||||
issues: 200,
|
issues: 200,
|
||||||
repos: 5,
|
repos: 5,
|
||||||
stars: 300,
|
stars: 300,
|
||||||
@@ -209,6 +213,7 @@ describe("Test fetchStats", () => {
|
|||||||
all_commits: true,
|
all_commits: true,
|
||||||
commits: 1000,
|
commits: 1000,
|
||||||
prs: 300,
|
prs: 300,
|
||||||
|
reviews: 50,
|
||||||
issues: 200,
|
issues: 200,
|
||||||
repos: 5,
|
repos: 5,
|
||||||
stars: 200,
|
stars: 200,
|
||||||
@@ -237,6 +242,7 @@ describe("Test fetchStats", () => {
|
|||||||
all_commits: false,
|
all_commits: false,
|
||||||
commits: 100,
|
commits: 100,
|
||||||
prs: 300,
|
prs: 300,
|
||||||
|
reviews: 50,
|
||||||
issues: 200,
|
issues: 200,
|
||||||
repos: 5,
|
repos: 5,
|
||||||
stars: 400,
|
stars: 400,
|
||||||
@@ -265,6 +271,7 @@ describe("Test fetchStats", () => {
|
|||||||
all_commits: false,
|
all_commits: false,
|
||||||
commits: 100,
|
commits: 100,
|
||||||
prs: 300,
|
prs: 300,
|
||||||
|
reviews: 50,
|
||||||
issues: 200,
|
issues: 200,
|
||||||
repos: 5,
|
repos: 5,
|
||||||
stars: 300,
|
stars: 300,
|
||||||
@@ -293,6 +300,7 @@ describe("Test fetchStats", () => {
|
|||||||
all_commits: false,
|
all_commits: false,
|
||||||
commits: 100,
|
commits: 100,
|
||||||
prs: 300,
|
prs: 300,
|
||||||
|
reviews: 50,
|
||||||
issues: 200,
|
issues: 200,
|
||||||
repos: 5,
|
repos: 5,
|
||||||
stars: 300,
|
stars: 300,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ 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,6 +2,8 @@ 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,4 +1,5 @@
|
|||||||
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,6 +8,7 @@ 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,6 +5,7 @@ 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,6 +2,7 @@ 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,6 +5,8 @@ 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";
|
||||||
|
|
||||||
@@ -431,14 +433,4 @@ 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,6 +18,7 @@ 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";
|
||||||
@@ -46,7 +47,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.
|
||||||
* @return {number[]} Resulting numbers array.
|
* @returns {number[]} Resulting numbers array.
|
||||||
*/
|
*/
|
||||||
const getNumbersFromSvgPathDefinitionAttribute = (d) => {
|
const getNumbersFromSvgPathDefinitionAttribute = (d) => {
|
||||||
return d
|
return d
|
||||||
@@ -78,7 +79,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.
|
||||||
* @return {number} Chart part percentage.
|
* @returns {number} Chart part percentage.
|
||||||
*/
|
*/
|
||||||
const langPercentFromDonutVerticalLayoutSvg = (
|
const langPercentFromDonutVerticalLayoutSvg = (
|
||||||
partLength,
|
partLength,
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ 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,20 +2,21 @@ 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, rej) => res({ data: "ok" }));
|
return new Promise((res) => res({ data: "ok" }));
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetcherFail = jest.fn(() => {
|
const fetcherFail = jest.fn(() => {
|
||||||
return new Promise((res, rej) =>
|
return new Promise((res) =>
|
||||||
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, rej) => {
|
return new Promise((res) => {
|
||||||
// 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" }] } });
|
||||||
@@ -40,10 +41,8 @@ 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 {
|
||||||
res = await retryer(fetcherFail, {});
|
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,6 +5,7 @@ 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,6 +5,7 @@ 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,6 +8,7 @@ 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", () => {
|
||||||
|
|||||||
@@ -430,6 +430,13 @@ export const themes = {
|
|||||||
border_color: "ffffff",
|
border_color: "ffffff",
|
||||||
bg_color: "000000",
|
bg_color: "000000",
|
||||||
},
|
},
|
||||||
|
ocean_breeze: {
|
||||||
|
"title_color": "0d6efd",
|
||||||
|
"icon_color": "0d6efd",
|
||||||
|
"text_color": "333333",
|
||||||
|
"bg_color": "f0f6fc",
|
||||||
|
"border_color": "d1d5da",
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default themes;
|
export default themes;
|
||||||
|
|||||||
Reference in New Issue
Block a user