diff --git a/.nycrc.json b/.c8rc.json similarity index 87% rename from .nycrc.json rename to .c8rc.json index 5e00c6d1746e1..9413073fbf999 100644 --- a/.nycrc.json +++ b/.c8rc.json @@ -9,10 +9,8 @@ "**/test-helpers.js", "**/*-test-helpers.js", "**/*-fixtures.js", - "**/mocha-*.js", "**/*.test-d.ts", "dangerfile.js", - "gatsby-*.js", "core/service-test-runner", "core/got-test-client.js", "services/**/*.tester.js", @@ -21,8 +19,10 @@ "core/base-service/loader-test-fixtures", "scripts", "coverage", - "build", ".github", - "**/public/" + "**/public/", + "cypress", + "frontend", + "migrations" ] } diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 0c4a2f6f8683b..0000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,359 +0,0 @@ -version: 2 - -main_steps: &main_steps - steps: - - checkout - - - run: - name: Install dependencies - command: npm ci - environment: - # https://docs.cypress.io/guides/getting-started/installing-cypress.html#Skipping-installation - # We don't need to install the Cypress binary in jobs that aren't actually running Cypress. - CYPRESS_INSTALL_BINARY: 0 - - - run: - name: Linter - when: always - command: npm run lint - - - run: - name: Core tests - when: always - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/core/results.xml - command: npm run test:core - - - run: - name: Entrypoint tests - when: always - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/entrypoint/results.xml - command: npm run test:entrypoint - - - store_test_results: - path: junit - - - run: - name: 'Prettier check (quick fix: `npm run prettier`)' - when: always - command: npm run prettier:check - -integration_steps: &integration_steps - steps: - - checkout - - - run: - name: Install dependencies - command: npm ci - environment: - CYPRESS_INSTALL_BINARY: 0 - - - run: - name: Integration tests - when: always - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/integration/results.xml - command: npm run test:integration - - - store_test_results: - path: junit - -services_steps: &services_steps - steps: - - checkout - - - run: - name: Install dependencies - command: npm ci - environment: - CYPRESS_INSTALL_BINARY: 0 - - - run: - name: Identify services tagged in the PR title - command: npm run test:services:pr:prepare - - - run: - name: Run tests for tagged services - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/services/results.xml - command: RETRY_COUNT=3 npm run test:services:pr:run - - - store_test_results: - path: junit - -package_steps: &package_steps - steps: - - checkout - - - run: - name: Install node and npm - command: | - set +e - export NVM_DIR="/opt/circleci/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm install v14 - nvm use v14 - npm install -g npm - - # Run the package tests on each currently supported node version. See: - # https://github.com/badges/shields/blob/master/badge-maker/README.md#node-version-support - # https://nodejs.org/en/about/releases/ - - - run: - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/badge-maker/v12/results.xml - NODE_VERSION: v12 - CYPRESS_INSTALL_BINARY: 0 - name: Run package tests on Node 12 - command: scripts/run_package_tests.sh - - - run: - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/badge-maker/v14/results.xml - NODE_VERSION: v14 - CYPRESS_INSTALL_BINARY: 0 - name: Run package tests on Node 14 - command: scripts/run_package_tests.sh - - - run: - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/badge-maker/v16/results.xml - NODE_VERSION: v16 - CYPRESS_INSTALL_BINARY: 0 - name: Run package tests on Node 16 - command: scripts/run_package_tests.sh - - - store_test_results: - path: junit - -jobs: - main: - docker: - - image: circleci/node:14 - - <<: *main_steps - - main@node-16: - docker: - - image: circleci/node:16 - - <<: *main_steps - - integration: - docker: - - image: circleci/node:14 - - image: redis - - <<: *integration_steps - - integration@node-16: - docker: - - image: circleci/node:16 - - image: redis - - <<: *integration_steps - - danger: - docker: - - image: circleci/node:14 - steps: - - checkout - - - run: - name: Install dependencies - command: npm ci - environment: - CYPRESS_INSTALL_BINARY: 0 - - - run: - name: Danger - when: always - environment: - # https://github.com/gatsbyjs/gatsby/pull/11555 - NODE_ENV: test - command: npm run danger ci - - frontend: - docker: - - image: circleci/node:14 - steps: - - checkout - - - run: - name: Install dependencies - command: npm ci - environment: - CYPRESS_INSTALL_BINARY: 0 - - - run: - name: Prepare frontend tests - command: npm run defs && npm run features - - - run: - name: Check types - command: npm run check-types:frontend - - - run: - name: Frontend unit tests - environment: - mocha_reporter: mocha-junit-reporter - MOCHA_FILE: junit/frontend/results.xml - when: always - command: npm run test:frontend - - - store_test_results: - path: junit - - - run: - name: Frontend build completes successfully - when: always - command: npm run build - - package: - machine: true - - <<: *package_steps - - services: - docker: - - image: circleci/node:14 - - <<: *services_steps - - services@node-16: - docker: - - image: circleci/node:16 - - <<: *services_steps - - e2e: - docker: - - image: cypress/base:14.16.0 - steps: - - checkout - - - restore_cache: - name: Restore Cypress binary - keys: - - v2-cypress-dependencies-{{ checksum "package-lock.json" }} - - - run: - name: Install dependencies - command: npm ci - - - run: - name: Frontend build - command: GATSBY_BASE_URL=http://localhost:8080 npm run build - - - run: - name: Run tests - environment: - CYPRESS_REPORTER: junit - MOCHA_FILE: junit/e2e/results.xml - command: npm run e2e-on-build - - - store_test_results: - path: junit - - - store_artifacts: - path: cypress/videos - - - store_artifacts: - path: cypress/screenshots - - - save_cache: - name: Cache Cypress binary - paths: - # https://docs.cypress.io/guides/getting-started/installing-cypress.html#Binary-cache - - ~/.cache/Cypress - key: v2-cypress-dependencies-{{ checksum "package-lock.json" }} - -workflows: - version: 2 - - on-commit: - jobs: - - main: - filters: - branches: - ignore: gh-pages - - main@node-16: - filters: - branches: - ignore: gh-pages - - integration@node-16: - filters: - branches: - ignore: gh-pages - - frontend: - filters: - branches: - ignore: gh-pages - - package: - filters: - branches: - ignore: gh-pages - - services: - filters: - branches: - ignore: - - master - - gh-pages - - services@node-16: - filters: - branches: - ignore: - - master - - gh-pages - - danger: - filters: - branches: - ignore: - - master - - gh-pages - - /dependabot\/.*/ - - e2e: - filters: - branches: - ignore: gh-pages - # on-commit-with-cache: - # jobs: - # - npm-install: - # filters: - # branches: - # ignore: gh-pages - # - main: - # requires: - # - npm-install - # - main@node-latest: - # requires: - # - npm-install - # - frontend: - # requires: - # - npm-install - # - services: - # requires: - # - npm-install - # filters: - # branches: - # ignore: master - # - services@node-latest: - # requires: - # - npm-install - # filters: - # branches: - # ignore: master - # - danger: - # requires: - # - npm-install - # filters: - # branches: - # ignore: /dependabot\/.*/ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000..1df72d64c0b4e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,14 @@ +{ + "name": "Node.js", + // "Officially" maintained node devcontainer image from Microsoft + // https://github.com/devcontainers/templates/tree/main/src/javascript-node + "image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "npm ci" +} diff --git a/.dockerignore b/.dockerignore index 17a2a01a4ba70..02e23cdd067a6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,12 @@ node_modules/ -shields.env .git/ .gitignore +.github .vscode/ +fly.toml + +*.md +doc/ # Improve layer cacheability. Dockerfile diff --git a/.editorconfig b/.editorconfig index 27a65a3586c47..4a8c4be5758ae 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,5 @@ +# The formatting for most files is handled by Prettier nowadays. +# See https://github.com/badges/shields/blob/master/CONTRIBUTING.md#prettier for more information. root = true @@ -6,7 +8,3 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = space - -[*.{js,json,html,css}] -charset = utf-8 -indent_size = 2 diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 170a29b892244..0000000000000 --- a/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -/api-docs/ -/build -/coverage -/__snapshots__ -public -badge-maker/node_modules/ -!.github/ diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index 0614f9a0134af..0000000000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,198 +0,0 @@ -extends: - - standard - - standard-jsx - - standard-react - - plugin:@typescript-eslint/recommended - - prettier - - eslint:recommended - -globals: - JSX: 'readonly' - -parserOptions: - # Override eslint-config-standard, which incorrectly sets this to "module", - # though that setting is only for ES6 modules, not CommonJS modules. - sourceType: 'script' - -settings: - react: - version: '16.8' - jsdoc: - mode: jsdoc - -plugins: - - chai-friendly - - jsdoc - - mocha - - no-extension-in-require - - sort-class-members - - import - - react-hooks - - promise - -overrides: - # For simplicity's sake, when possible prefer to add rules to the top-level - # list of rules, even if they only apply to certain files. That way the - # rules listed here are only ones which conflict. - - - files: - - '**/*.js' - - '!frontend/**/*.js' - env: - node: true - es6: true - rules: - no-console: 'off' - '@typescript-eslint/explicit-module-boundary-types': 'off' - - - files: - - '**/*.@(ts|tsx)' - parserOptions: - sourceType: 'module' - parser: '@typescript-eslint/parser' - rules: - # Argh. - '@typescript-eslint/explicit-function-return-type': - ['error', { 'allowExpressions': true }] - '@typescript-eslint/no-empty-function': 'error' - '@typescript-eslint/no-var-requires': 'error' - '@typescript-eslint/no-object-literal-type-assertion': 'off' - '@typescript-eslint/no-explicit-any': 'error' - '@typescript-eslint/ban-ts-ignore': 'off' - '@typescript-eslint/explicit-module-boundary-types': 'off' - - - files: - - core/**/*.ts - parserOptions: - sourceType: 'module' - parser: '@typescript-eslint/parser' - - files: - - gatsby-browser.js - - 'frontend/**/*.@(js|ts|tsx)' - parserOptions: - sourceType: 'module' - env: - browser: true - rules: - import/extensions: - ['error', 'never', { 'json': 'always', 'yml': 'always' }] - - - files: - - 'core/base-service/**/*.js' - - 'services/**/*.js' - rules: - sort-class-members/sort-class-members: - [ - 'error', - { - order: - [ - 'name', - 'category', - 'isDeprecated', - 'route', - 'auth', - 'examples', - '_cacheLength', - 'defaultBadgeData', - 'render', - 'constructor', - 'fetch', - 'transform', - 'handle', - ], - }, - ] - - - files: - - '**/*.spec.@(js|ts|tsx)' - - '**/*.integration.js' - - '**/test-helpers.js' - - 'core/service-test-runner/**/*.js' - env: - mocha: true - rules: - mocha/no-exclusive-tests: 'error' - mocha/no-mocha-arrows: 'error' - mocha/prefer-arrow-callback: 'error' - -rules: - # Disable some rules from eslint:recommended. - no-empty: ['error', { 'allowEmptyCatch': true }] - - # Allow unused parameters. In callbacks, removing them seems to obscure - # what the functions are doing. - '@typescript-eslint/no-unused-vars': ['error', { 'args': 'none' }] - no-unused-vars: 'off' - - '@typescript-eslint/no-var-requires': 'off' - - '@typescript-eslint/no-use-before-define': 'error' - no-use-before-define: 'off' - - # These should be disabled by eslint-config-prettier, but are not. - no-extra-semi: 'off' - - # Shields additions. - no-var: 'error' - prefer-const: 'error' - arrow-body-style: ['error', 'as-needed'] - no-extension-in-require/main: 'error' - object-shorthand: ['error', 'properties'] - prefer-template: 'error' - promise/prefer-await-to-then: 'error' - func-style: ['error', 'declaration', { 'allowArrowFunctions': true }] - new-cap: ['error', { 'capIsNew': true }] - import/order: ['error', { 'newlines-between': 'never' }] - - # Account for destructuring responses from upstream services, - # many of which do not follow camelcase - # Based on original rule configuration from eslint-config-standard - camelcase: - [ - 'error', - { - ignoreDestructuring: true, - properties: 'never', - ignoreGlobals: true, - allow: ['^UNSAFE_'], - }, - ] - - # Chai friendly. - no-unused-expressions: 'off' - chai-friendly/no-unused-expressions: 'error' - - # jsdoc plugin: - # don't require every class/function to have a docblock - jsdoc/require-jsdoc: 'off' - - # allow Joi as an undefined type - jsdoc/no-undefined-types: ['error', { definedTypes: ['Joi'] }] - - # all the other recommended rules as errors (not warnings) - jsdoc/check-alignment: 'error' - jsdoc/check-param-names: 'error' - jsdoc/check-tag-names: 'error' - jsdoc/check-types: 'error' - jsdoc/implements-on-classes: 'error' - jsdoc/newline-after-description: 'error' - jsdoc/require-param: 'error' - jsdoc/require-param-description: 'error' - jsdoc/require-param-name: 'error' - jsdoc/require-param-type: 'error' - jsdoc/require-returns: 'error' - jsdoc/require-returns-check: 'error' - jsdoc/require-returns-description: 'error' - jsdoc/require-returns-type: 'error' - jsdoc/valid-types: 'error' - - # Disable some from TypeScript. - '@typescript-eslint/camelcase': off - '@typescript-eslint/explicit-function-return-type': 'off' - '@typescript-eslint/no-empty-function': 'off' - - react/jsx-sort-props: 'error' - react-hooks/rules-of-hooks: 'error' - react-hooks/exhaustive-deps: 'error' - jsx-quotes: ['error', 'prefer-double'] diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000..6313b56c57848 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/ISSUE_TEMPLATE/1_Bug_report.yml b/.github/ISSUE_TEMPLATE/1_Bug_report.yml index b2f126dd9a1fe..417bc782df20b 100644 --- a/.github/ISSUE_TEMPLATE/1_Bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1_Bug_report.yml @@ -41,4 +41,4 @@ body: attributes: value: | ## :heart: Love Shields? - Please consider donating $10 to sustain our activities: [https://opencollective.com/shields](https://opencollective.com/shields) + Please consider donating to sustain our activities: [https://opencollective.com/shields](https://opencollective.com/shields) diff --git a/.github/ISSUE_TEMPLATE/2_Failing_service_test.md b/.github/ISSUE_TEMPLATE/2_Failing_service_test.md index 4de1d140813c6..57919ee852193 100644 --- a/.github/ISSUE_TEMPLATE/2_Failing_service_test.md +++ b/.github/ISSUE_TEMPLATE/2_Failing_service_test.md @@ -18,19 +18,15 @@ labels: 'keep-service-tests-green' -:link: **CircleCI link** - - - -:beetle: **Stack trace** +:lady_beetle: **Stack trace** ``` - + ``` :bulb: **Possible solution** - diff --git a/.github/ISSUE_TEMPLATE/3_Badge_request.md b/.github/ISSUE_TEMPLATE/3_Badge_request.md deleted file mode 100644 index 37936abaa6921..0000000000000 --- a/.github/ISSUE_TEMPLATE/3_Badge_request.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -name: 💡 Badge Request -about: Ideas for new badges -labels: 'service-badge' ---- - -:clipboard: **Description** - - - -:link: **Data** - - - -:microphone: **Motivation** - - - - diff --git a/.github/ISSUE_TEMPLATE/3_Badge_request.yml b/.github/ISSUE_TEMPLATE/3_Badge_request.yml new file mode 100644 index 0000000000000..1f6cc81bc0924 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3_Badge_request.yml @@ -0,0 +1,58 @@ +name: '💡 Badge Request' +description: Ideas for new badges +labels: ['service-badge'] +body: + - type: markdown + attributes: + value: > + ## Ideas for new badges + + + This issue template is for suggesting new badges which **fetch and display data from an upstream service**. If your suggestion is for a static badge (which shows the same information every time it is requested), it is [already possible to make these](https://shields.io/docs/static-badges). We don't add specific routes for badges which only show static information. + + + - type: textarea + id: description + attributes: + label: '📋 Description' + description: | + A clear and concise description of the new badge. + + - Which service is this badge for e.g: GitHub, Travis CI + - What sort of information should this badge show? + Provide an example in plain text e.g: "version | v1.01" or as a static badge + (static badge generator can be found at https://shields.io/badges/static-badge ) + validations: + required: true + + - type: textarea + id: data + attributes: + label: '🔗 Data' + description: | + Where can we get the data from? + + Please consider and cover details like: + - Is there a public API? + - Does the API require authentication or an API key? + If so, please review our documentation on [Badges Requiring Authentication](https://github.com/badges/shields/blob/master/doc/authentication.md) + - Link to the API documentation. + validations: + required: true + + - type: textarea + id: motivation + attributes: + label: '🎤 Motivation' + description: | + Please explain why this feature should be implemented and how it would be used. + + - What is the specific use case? + validations: + required: true + + - type: markdown + attributes: + value: | + ## :heart: Love Shields? + Please consider donating to sustain our activities: [https://opencollective.com/shields](https://opencollective.com/shields) diff --git a/.github/ISSUE_TEMPLATE/4_Feature_request.md b/.github/ISSUE_TEMPLATE/4_Feature_request.md index 64f5f734b59a6..d285358ebf665 100644 --- a/.github/ISSUE_TEMPLATE/4_Feature_request.md +++ b/.github/ISSUE_TEMPLATE/4_Feature_request.md @@ -7,5 +7,5 @@ about: Ideas for other new features or improvements - diff --git a/.github/actions/close-bot/action.yml b/.github/actions/close-bot/action.yml deleted file mode 100644 index 0c74e5eaa750b..0000000000000 --- a/.github/actions/close-bot/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Auto Approve' -description: 'Automatically approve/close selected pull requests for shields.io' -branding: - icon: 'check-circle' - color: 'green' -inputs: - github-token: - description: 'The GITHUB_TOKEN secret' - required: true -runs: - using: 'node12' - main: 'index.js' diff --git a/.github/actions/close-bot/helpers.js b/.github/actions/close-bot/helpers.js deleted file mode 100644 index 13daf44ccb406..0000000000000 --- a/.github/actions/close-bot/helpers.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict' - -function findChangelogStart(lines) { - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - if ( - line === 'Changelog' && - lines[i + 2] === '
' - ) { - return i + 3 - } - } - return null -} - -function findChangelogEnd(lines, start) { - for (let i = start; i < lines.length; i++) { - const line = lines[i] - if (line === '
') { - return i - } - } - return null -} - -function allChangelogLinesAreVersionBump(changelogLines) { - return ( - changelogLines.length > 0 && - changelogLines.length === - changelogLines.filter(line => - line.includes('Version bump only for package') - ).length - ) -} - -function isPointlessVersionBump(body) { - const pointlessBumpLinks = [ - 'https://github.com/gatsbyjs/gatsby', - 'https://github.com/typescript-eslint/typescript-eslint', - ] - - const lines = body.split(/\r?\n/) - if (!pointlessBumpLinks.some(link => lines[0].includes(link))) { - return false - } - const start = findChangelogStart(lines) - const end = findChangelogEnd(lines, start) - if (!start || !end) { - return false - } - const changelogLines = lines - .slice(start, end) - .filter(line => !line.startsWith(' !line.startsWith('

All notable changes')) - .filter( - line => !line.startsWith('See ') - ) - .filter(line => !line.startsWith(' x [#9496](https://github.com/badges/shields/issues/9496) +- [bundlejs] add badge for the npm package size [#9055](https://github.com/badges/shields/issues/9055) +- Switch [OpenCollective] badges to use GraphQL and auth [#9387](https://github.com/badges/shields/issues/9387) +- [Pulsar] Add Pulsar Badges for Stargazers & Downloads [#8767](https://github.com/badges/shields/issues/8767) +- Add [CurseForge] badges [#9252](https://github.com/badges/shields/issues/9252) +- deploy on node 18 [#9385](https://github.com/badges/shields/issues/9385) +- allow calling [github] without auth [#9427](https://github.com/badges/shields/issues/9427) +- Dependency updates + +## server-2023-08-01 + +- Convert `examples` arrays to `openApi` objects (part 1) [#9320](https://github.com/badges/shields/issues/9320) +- Migrate from docs.rs' builds API to status API [#9422](https://github.com/badges/shields/issues/9422) +- [OpenVSX] Fix OpenVSX API call for unversioned package URLs [#9408](https://github.com/badges/shields/issues/9408) +- Add support for [Lemmy] [#9368](https://github.com/badges/shields/issues/9368) +- upgrade to npm 9 [#9323](https://github.com/badges/shields/issues/9323) +- Go back to default YouTube cache [#9372](https://github.com/badges/shields/issues/9372) +- Add [GitHubDiscussionsSearch] and GitHubRepoDiscussionsSearch service [#9340](https://github.com/badges/shields/issues/9340) +- Allow user to filter github tags and releases [#9193](https://github.com/badges/shields/issues/9193) +- don't URL encode slash in [githubactionsworkflow] badge [#9322](https://github.com/badges/shields/issues/9322) +- add a bit of border to select boxes [#9348](https://github.com/badges/shields/issues/9348) +- deprecate [snyk] badges [#9349](https://github.com/badges/shields/issues/9349) +- increase max-age on [docker] badges, again [#9350](https://github.com/badges/shields/issues/9350) [#9369](https://github.com/badges/shields/issues/9369) +- Dependency updates + +## server-2023-07-02 + +By far the most significant change in this release is the long-awaited launch of the re-designed frontend: + +- migrate frontend to docusaurus [#9014](https://github.com/badges/shields/issues/9014) +- fix a load of spacing issues in frontend content [#9281](https://github.com/badges/shields/issues/9281) +- set a sensible meta description [#9283](https://github.com/badges/shields/issues/9283) +- chore(frontend): open homepage feature links in new tab [#9300](https://github.com/badges/shields/issues/9300) +- adapt opencollective images to theme background [#9298](https://github.com/badges/shields/issues/9298) +- temp fix: wrap code examples tabs in narrow browser windows [#9302](https://github.com/badges/shields/issues/9302) +- add a bit of border to text boxes [#9324](https://github.com/badges/shields/issues/9324) + +Other changes in this release: + +- cache [dockerpulls] badges for an hour [#9343](https://github.com/badges/shields/issues/9343) +- Mention YouTube API services and link to Google Privacy Policy [#9339](https://github.com/badges/shields/issues/9339) +- allow negative timestamps in relative [date] badge [#9321](https://github.com/badges/shields/issues/9321) +- upgrade to graphql 16 [#9290](https://github.com/badges/shields/issues/9290) +- remove obsolete travis .org examples [#9284](https://github.com/badges/shields/issues/9284) +- increase max age on reddit badges [#9282](https://github.com/badges/shields/issues/9282) +- feat: Add author filter option for [GithubCommitActivity] [#9251](https://github.com/badges/shields/issues/9251) +- Fix: [GithubCommitActivity] invalid branch error handling [#9258](https://github.com/badges/shields/issues/9258) +- Implement a pattern for dealing with upstream APIs which are slow on the first hit; affects [endpoint] [#9233](https://github.com/badges/shields/issues/9233) +- Delete old deprecated services [#9254](https://github.com/badges/shields/issues/9254) +- feat: add 'canceled' status to netlify deploy badge [#9240](https://github.com/badges/shields/issues/9240) +- increase default cache on youtube badges [#9238](https://github.com/badges/shields/issues/9238) +- embiggen youtube cache, again [#9250](https://github.com/badges/shields/issues/9250) +- Dependency updates + +## server-2023-06-01 + +- feat: Add total commits to [GitHubCommitActivity] [#9196](https://github.com/badges/shields/issues/9196) +- set a custom error on 429 [#9159](https://github.com/badges/shields/issues/9159) +- deprecate [travis].org badges [#9171](https://github.com/badges/shields/issues/9171) +- count private sponsors on [GithubSponsors] badge [#9170](https://github.com/badges/shields/issues/9170) +- Dependency updates + +## server-2023-05-01 + +**Removal:** For users who need to maintain a Github Token pool, storage has been provided via the `RedisTokenPersistence` and `REDIS_URL` settings. This feature was deprecated in `server-2023-03-01`. As of this release, the `RedisTokenPersistence` backend is now removed. If you are using this feature, you will need to migrate to using the `SQLTokenPersistence` backend for storage and provide a postgres connection string via the `POSTGRES_URL` setting. [#8922](https://github.com/badges/shields/issues/8922) + +- fail to start server if there are duplicate service names [#9099](https://github.com/badges/shields/issues/9099) +- [SourceForge] Added badges for SourceForge [#9078](https://github.com/badges/shields/issues/9078) [#9102](https://github.com/badges/shields/issues/9102) +- crates: Use `?include=` to reduce crates.io backend load [#9081](https://github.com/badges/shields/issues/9081) +- Dependency updates + +## server-2023-04-02 + +- [JenkinsCoverage] Update Jenkins Code Coverage API for new plugin version [#9010](https://github.com/badges/shields/issues/9010) +- [CTAN] fallback to date if version is empty [#9036](https://github.com/badges/shields/issues/9036) +- Update to [CTAN] API version 2.0 [#9016](https://github.com/badges/shields/issues/9016) +- handle missing statistics array in [VisualStudioMarketplace] badges [#8985](https://github.com/badges/shields/issues/8985) +- [Netlify] upgrade colors for SVG parsing [#8971](https://github.com/badges/shields/issues/8971) +- Fix [Vcpkg] version service for different version fields [#8945](https://github.com/badges/shields/issues/8945) +- only try to close pool if one exists [#8947](https://github.com/badges/shields/issues/8947) +- misc minor fixes to [githubsize node pypi] [#8946](https://github.com/badges/shields/issues/8946) +- Dependency updates + +## server-2023-03-01 + +**Deprecation:** For users who need to maintain a Github Token pool, storage has been provided via the `RedisTokenPersistence` and `REDIS_URL` settings. As of this release, the `RedisTokenPersistence` backend is now deprecated and will be removed in a future release. If you are using this feature, you will need to migrate to using the `SQLTokenPersistence` backend for storage and provide a postgres connection string via the `POSTGRES_URL` setting. [#8922](https://github.com/badges/shields/issues/8922) + +- fix: for crates.io versions, use max_stable_version if it exists [#8687](https://github.com/badges/shields/issues/8687) +- don't autofocus search [#8927](https://github.com/badges/shields/issues/8927) +- Add [Vcpkg] version service [#8923](https://github.com/badges/shields/issues/8923) +- fix: Set uid/gid in docker image to 0 [#8908](https://github.com/badges/shields/issues/8908) +- expose port 443 in Dockerfile [#8889](https://github.com/badges/shields/issues/8889) +- Dependency updates + +## server-2023-02-01 + +- replace [twitter] badge with static fallback [#8842](https://github.com/badges/shields/issues/8842) +- Add various [Polymart] badges [#8811](https://github.com/badges/shields/issues/8811) +- update [githubpipenv] tests/examples [#8797](https://github.com/badges/shields/issues/8797) +- deprecate [apm] service [#8773](https://github.com/badges/shields/issues/8773) +- deprecate lgtm [#8771](https://github.com/badges/shields/issues/8771) +- Dependency updates + +## server-2023-01-01 + +- Breaking change: Routes for GitHub workflows badge have changed. See https://github.com/badges/shields/issues/8671 for more details +- Behaviour change: In this release we fixed a long standing bug. GitHub badges were previously not reading the base URL from the `config.service.baseUri`. This release fixes that bug, bringing the code into line with the documented behaviour. This should not cause a behaviour change for most users, but users who had previously set a value in `config.service.baseUri` which was previously ignored could see this now have an effect. Users who configure their instance using env vars rather than yaml should see no change. +- Send `X-GitHub-Api-Version` when calling [GitHub] v3 API [#8669](https://github.com/badges/shields/issues/8669) +- add [VpmVersion] badge [#8755](https://github.com/badges/shields/issues/8755) +- Add [modrinth] game versions [#8673](https://github.com/badges/shields/issues/8673) +- fix debug logging of undefined query params [#8540](https://github.com/badges/shields/issues/8540), [#8757](https://github.com/badges/shields/issues/8757) +- fall back to classifiers if [pypi] license text is really long [#8690](https://github.com/badges/shields/issues/8690) +- allow passing key to [stackexchange] [#8539](https://github.com/badges/shields/issues/8539) +- Dependency updates + +## server-2022-12-01 + +- fix: support logoColor to shield icons. [#8263](https://github.com/badges/shields/issues/8263) +- handle missing properties array in [VisualStudioMarketplaceVersion] [#8603](https://github.com/badges/shields/issues/8603) +- deprecate [wercker] service [#8642](https://github.com/badges/shields/issues/8642) +- Add [Coincap] Cryptocurrency badges [#8623](https://github.com/badges/shields/issues/8623) +- Add [modrinth] version [#8604](https://github.com/badges/shields/issues/8604) +- [factorio-mod-portal] services [#8625](https://github.com/badges/shields/issues/8625) +- [Coveralls] for GitLab [#8584](https://github.com/badges/shields/issues/8584), [#8644](https://github.com/badges/shields/issues/8644) +- Remove 'suggest badges' feature [#8311](https://github.com/badges/shields/issues/8311) +- Add [modrinth] followers [#8601](https://github.com/badges/shields/issues/8601) +- Update the [modrinth] API to v2 [#8600](https://github.com/badges/shields/issues/8600) +- tidy up [GitHubGist] routes [#8510](https://github.com/badges/shields/issues/8510) +- fix [flathub] version error handling [#8500](https://github.com/badges/shields/issues/8500) +- Dependency updates + +## server-2022-11-01 + +- [Ansible] Add collection badge [#8578](https://github.com/badges/shields/issues/8578) +- [VisualStudioMarketplace] Add support to prerelease extensions version (Issue #8207) [#8561](https://github.com/badges/shields/issues/8561) +- feat: add [GitlabLastCommit] service [#8508](https://github.com/badges/shields/issues/8508) +- fix [swagger] service tests (allow 0 items in array) [#8564](https://github.com/badges/shields/issues/8564) +- fix codecov badge for non-default branch [#8565](https://github.com/badges/shields/issues/8565) +- Add [GitHubLastCommit] by committer badge [#8537](https://github.com/badges/shields/issues/8537) +- [GitHubReleaseDate] - published_at field [#8543](https://github.com/badges/shields/issues/8543) +- Fix [Testspace] with new "untested" value in case_counts array [#8544](https://github.com/badges/shields/issues/8544) +- fix: Support WAITING status for GitHub deployments [#8521](https://github.com/badges/shields/issues/8521) +- [Whatpulse] badge for a user and for a team [#8466](https://github.com/badges/shields/issues/8466) +- deprecate [pkgreview] service [#8499](https://github.com/badges/shields/issues/8499) +- Dependency updates + +## server-2022-10-08 + +- deprecate [criterion] service [#8501](https://github.com/badges/shields/issues/8501) +- fix formatRelativeDate error handling; run [date] [#8497](https://github.com/badges/shields/issues/8497) +- allow/validate bitbucket_username / bitbucket_password in private config schema [#8472](https://github.com/badges/shields/issues/8472) +- fix [pub] points badge test and example [#8498](https://github.com/badges/shields/issues/8498) +- feat: add [GitlabLanguageCount] service [#8377](https://github.com/badges/shields/issues/8377) +- [GitHubGistStars] add GitHub Gist Stars [#8471](https://github.com/badges/shields/issues/8471) +- fix display/search of CII badge examples [#8473](https://github.com/badges/shields/issues/8473) +- feat: add 2022 support to GitHub Hacktoberfest [#8468](https://github.com/badges/shields/issues/8468) +- fix [GitLabCoverage] subgroup bug [#8401](https://github.com/badges/shields/issues/8401) +- implement ruby gems-specific version sort/color functions [#8434](https://github.com/badges/shields/issues/8434) +- Add `rc` to pre-release identifiers [#8435](https://github.com/badges/shields/issues/8435) +- add [GitHub] Number of commits between branches/tags/commits [#8394](https://github.com/badges/shields/issues/8394) +- add [Packagist] dependency version [#8371](https://github.com/badges/shields/issues/8371) +- fix Docker build status invalid response data bug [#8392](https://github.com/badges/shields/issues/8392) +- Dependency updates + +## server-2022-09-04 + +- fix frontend compile for users running on Windows [#8350](https://github.com/badges/shields/issues/8350) +- [DockerSize] Docker image size multi arch [#8290](https://github.com/badges/shields/issues/8290) +- upgrade gatsby [#8334](https://github.com/badges/shields/issues/8334) +- Custom domains for [JitPack] artifacts [#8333](https://github.com/badges/shields/issues/8333) +- fix [dockerstars] service [#8316](https://github.com/badges/shields/issues/8316) +- [BountySource] Fix: Broken Badge generation for decimal activity values [#8315](https://github.com/badges/shields/issues/8315) +- feat: add [gitlabmergerequests] service [#8166](https://github.com/badges/shields/issues/8166) +- Fix terminology for [ROS] version service [#8292](https://github.com/badges/shields/issues/8292) +- feat: add [GitlabStars] service [#8209](https://github.com/badges/shields/issues/8209) +- Fix invalid `rst` format when `alt` or `target` is present [#8275](https://github.com/badges/shields/issues/8275) +- [GithubGistLastCommit] GitHub gist last commit [#8272](https://github.com/badges/shields/issues/8272) +- [GitHub] GitHub file size for a specific branch [#8262](https://github.com/badges/shields/issues/8262) +- Dependency updates + +## server-2022-08-01 + +- [pypi] Add Framework Version Badges support [#8261](https://github.com/badges/shields/issues/8261) +- feat: add [GitlabForks] server [#8208](https://github.com/badges/shields/issues/8208) +- Update PyPI api according to https://warehouse.pypa.io/api-reference/json.html [#8251](https://github.com/badges/shields/issues/8251) +- Add [galaxytoolshed] Activity [#8164](https://github.com/badges/shields/issues/8164) +- [greasyfork] Add Greasy Fork rating badges [#8087](https://github.com/badges/shields/issues/8087) +- refactor(deps): Replace moment with dayjs [#8192](https://github.com/badges/shields/issues/8192) +- add spaces round pipe in [conda] badge [#8189](https://github.com/badges/shields/issues/8189) +- Add [ROS] version service [#8169](https://github.com/badges/shields/issues/8169) +- feat: add [gitlabissues] service [#8108](https://github.com/badges/shields/issues/8108) +- Dependency updates + +## server-2022-07-03 + +- Add [galaxytoolshed] services [#8114](https://github.com/badges/shields/issues/8114) +- fix [gitlab] auth [#8145](https://github.com/badges/shields/issues/8145) [#8162](https://github.com/badges/shields/issues/8162) +- increase cache length on AUR version badge, run [AUR] [#8110](https://github.com/badges/shields/issues/8110) +- Use GraphQL to fix GitHub file count badges [github] [#8112](https://github.com/badges/shields/issues/8112) +- feat: add [gitlab] contributors service [#8084](https://github.com/badges/shields/issues/8084) +- [greasyfork] Add Greasy Fork service badges [#8080](https://github.com/badges/shields/issues/8080) +- Add [gitlablicense] services [#8024](https://github.com/badges/shields/issues/8024) +- [Spack] Package Manager: Update Domain [#8046](https://github.com/badges/shields/issues/8046) +- switch [jitpack] to use latestOk endpoint [#8041](https://github.com/badges/shields/issues/8041) +- Dependency updates + +## server-2022-06-01 + +- Update GitLab logo (2022) [#7984](https://github.com/badges/shields/issues/7984) +- [GitHub] Added milestone property to GitHub issue details service [#7864](https://github.com/badges/shields/issues/7864) +- [Spack] Package Manager: Update Endpoint [#7957](https://github.com/badges/shields/issues/7957) +- Update Chocolatey API endpoint URL [#7952](https://github.com/badges/shields/issues/7952) +- [Flathub]Add downloads badge [#7724](https://github.com/badges/shields/issues/7724) +- replace the outdated Telegram logo with the newest [#7831](https://github.com/badges/shields/issues/7831) +- add [PUB] points badge [#7918](https://github.com/badges/shields/issues/7918) +- add [PUB] popularity badge [#7920](https://github.com/badges/shields/issues/7920) +- add [PUB] likes badge [#7916](https://github.com/badges/shields/issues/7916) +- Dependency updates + +## server-2022-05-03 + +- [OSSFScorecard] Create scorecard badge service [#7687](https://github.com/badges/shields/issues/7687) +- Stringify [githublanguagecount] message [#7881](https://github.com/badges/shields/issues/7881) +- Stringify and trim whitespace from a few services [#7880](https://github.com/badges/shields/issues/7880) +- add labels to Dockerfile [#7862](https://github.com/badges/shields/issues/7862) +- handle missing 'fly-client-ip' [#7814](https://github.com/badges/shields/issues/7814) +- Dependency updates + +## server-2022-04-03 + +- Breaking change: This release updates ioredis from v4 to v5. If you are using redis for GitHub token pooling, redis connection strings of the form `redis://junkusername:authpassword@example.com:1234` will need to be updated to `redis://:authpassword@example.com:1234`. See the [ioredis upgrade guide](https://github.com/luin/ioredis/wiki/Upgrading-from-v4-to-v5) for further details. +- fix installation issue on npm >= 8.5.5 [#7809](https://github.com/badges/shields/issues/7809) +- two fixes for [packagist] schemas [#7782](https://github.com/badges/shields/issues/7782) +- allow requireCloudflare setting to work when hosted on fly.io [#7781](https://github.com/badges/shields/issues/7781) +- fix [pypi] badges when package has null license [#7761](https://github.com/badges/shields/issues/7761) +- Add a [pub] publisher badge [#7715](https://github.com/badges/shields/issues/7715) +- Switch Steam file size badge to informational color [#7722](https://github.com/badges/shields/issues/7722) +- Make W3C and Youtube documentation links clickable [#7721](https://github.com/badges/shields/issues/7721) +- Improve Wercker examples [#7720](https://github.com/badges/shields/issues/7720) +- Improve Cirrus CI examples [#7719](https://github.com/badges/shields/issues/7719) +- Support [CodeClimate] responses with multiple data items [#7716](https://github.com/badges/shields/issues/7716) +- Delete [TeamCityCoverage] and [BowerVersion] redirectors [#7718](https://github.com/badges/shields/issues/7718) +- Deprecate [Shippable] service [#7717](https://github.com/badges/shields/issues/7717) +- fix: restore version comparison updates from #4173 [#4254](https://github.com/badges/shields/issues/4254) +- [piwheels], filter out versions with no files [#7696](https://github.com/badges/shields/issues/7696) +- set a longer cacheLength on [librariesio] badges [#7692](https://github.com/badges/shields/issues/7692) +- improve python version formatting [#7682](https://github.com/badges/shields/issues/7682) +- Clarify GitHub All Contributors badge [#7690](https://github.com/badges/shields/issues/7690) +- Support [HexPM] packages with no stable release [#7685](https://github.com/badges/shields/issues/7685) +- Add Test at Scale Badge [#7612](https://github.com/badges/shields/issues/7612) +- [packagist] api v2 support [#7681](https://github.com/badges/shields/issues/7681) +- Add [piwheels] version badge [#7656](https://github.com/badges/shields/issues/7656) +- Dependency updates + +## server-2022-03-01 + +- Add [Conan] version service (#7460) +- remove suspended [github] tokens from the pool [#7654](https://github.com/badges/shields/issues/7654) +- generate links without trailing : if port not set [#7655](https://github.com/badges/shields/issues/7655) +- Use the latest build status when checking docs.rs [#7613](https://github.com/badges/shields/issues/7613) +- Remove no download handling and add API warning to [Wordpress] badges [#7606](https://github.com/badges/shields/issues/7606) +- set a higher default cacheLength on rating/star category [#7587](https://github.com/badges/shields/issues/7587) +- Update [amo] to use v4 API, set custom `cacheLength`s [#7586](https://github.com/badges/shields/issues/7586) +- fix(amo): include trailing slash in API call [#7585](https://github.com/badges/shields/issues/7585) +- fix docker image user agent [#7582](https://github.com/badges/shields/issues/7582) +- Delete deprecated Codetally and continuousphp services [#7572](https://github.com/badges/shields/issues/7572) +- Deprecate [Requires] service [#7571](https://github.com/badges/shields/issues/7571) +- [AUR] Fix RPC URL [#7570](https://github.com/badges/shields/issues/7570) +- Dependency updates + +## server-2022-02-01 + +- [Depfu] Add support for Gitlab [#7475](https://github.com/badges/shields/issues/7475) +- replace label in hn-user-karma with U/ [#7500](https://github.com/badges/shields/issues/7500) +- Support [Feedz] response with multiple pages without items [#7476](https://github.com/badges/shields/issues/7476) +- revert decamelize and humanize-string to old versions [#7449](https://github.com/badges/shields/issues/7449) +- Dependency updates + +## server-2022-01-01 + +- minor [reddit] improvements [#7436](https://github.com/badges/shields/issues/7436) +- [HackerNews] Show User Karma [#7411](https://github.com/badges/shields/issues/7411) +- [YouTube] Drop support for removed dislikes [#7410](https://github.com/badges/shields/issues/7410) +- change closed GitHub issue color to purple [#7374](https://github.com/badges/shields/issues/7374) +- restore cors header injection from #4171 [#4255](https://github.com/badges/shields/issues/4255) +- [GithubPackageJson] Get version from monorepo subfolder package.json [#7350](https://github.com/badges/shields/issues/7350) +- Dependency updates + +## server-2021-12-01 + +- Send better user-agent values [#7309](https://github.com/badges/shields/issues/7309) Self-hosting users now send a user agent which indicates the server version and starts `shields (self-hosted)/` by default. This can be configured using the env var `USER_AGENT_BASE` +- upgrade to node 16 [#7271](https://github.com/badges/shields/issues/7271) +- feat: deprecate dependabot badges [#7274](https://github.com/badges/shields/issues/7274) +- fix: npmversion tagged service test [#7269](https://github.com/badges/shields/issues/7269) +- feat: create new Test Results category [#7218](https://github.com/badges/shields/issues/7218) +- Migration from Request to Got for all HTTP requests is completed in this release +- Dependency updates + +## server-2021-11-04 + +- migrate regularUpdate() from request-->got [#7215](https://github.com/badges/shields/issues/7215) +- migrate github badges to use got instead of request; affects [github librariesio] [#7212](https://github.com/badges/shields/issues/7212) +- deprecate David badges [#7197](https://github.com/badges/shields/issues/7197) +- fix: ensure libraries.io header values are processed numerically [#7196](https://github.com/badges/shields/issues/7196) +- Add authentication for Libraries.io-based badges, run [Libraries Bower] [#7080](https://github.com/badges/shields/issues/7080) +- fixes and tests for pipenv helpers [#7194](https://github.com/badges/shields/issues/7194) +- add GitLab Release badge, run all [GitLab] [#7021](https://github.com/badges/shields/issues/7021) +- set content-length header on badge responses [#7179](https://github.com/badges/shields/issues/7179) +- fix [github] release/tag/download schema [#7170](https://github.com/badges/shields/issues/7170) +- Supported nested groups on [GitLabPipeline] badge [#7159](https://github.com/badges/shields/issues/7159) +- Support nested groups on [GitLabTag] badge [#7158](https://github.com/badges/shields/issues/7158) +- Fixing incorrect JetBrains Plugin rating values for [JetBrainsRating] [#7140](https://github.com/badges/shields/issues/7140) +- support using release or tag name in [GitHub] Release version badge [#7075](https://github.com/badges/shields/issues/7075) +- feat: support branches in sonar badges [#7065](https://github.com/badges/shields/issues/7065) +- Add [Modrinth] total downloads badge [#7132](https://github.com/badges/shields/issues/7132) +- remove [github] admin routes [#7105](https://github.com/badges/shields/issues/7105) +- Dependency updates + +## server-2021-10-04 + +- feat: add 2021 support to GitHub Hacktoberfest [#7086](https://github.com/badges/shields/issues/7086) +- Add [ClearlyDefined] service [#6944](https://github.com/badges/shields/issues/6944) +- handle null licenses in crates.io response schema, run [crates] [#7074](https://github.com/badges/shields/issues/7074) +- [OBS] add Open Build Service service-badge [#6993](https://github.com/badges/shields/issues/6993) +- Correction of badges url in self-hosting configuration with a custom port. Issue 7025 [#7036](https://github.com/badges/shields/issues/7036) +- fix: support gitlab token via env var [#7023](https://github.com/badges/shields/issues/7023) +- Add API-based support for [GitLab] badges, add new GitLab Tag badge [#6988](https://github.com/badges/shields/issues/6988) +- [freecodecamp]: allow + symbol in username [#7016](https://github.com/badges/shields/issues/7016) +- Rename Riot to Element in Matrix badge help [#6996](https://github.com/badges/shields/issues/6996) +- Fixed Reddit Negative Karma Issue [#6992](https://github.com/badges/shields/issues/6992) +- Dependency updates + ## server-2021-09-01 - use multi-stage build to reduce size of docker images [#6938](https://github.com/badges/shields/issues/6938) @@ -59,9 +799,7 @@ Note: this changelog is for the shields.io server. The changelog for the badge-m ## server-2021-05-01 -- Add setting which allows setting a timeout on HTTP requests - This is configured with the new `REQUEST_TIMEOUT_SECONDS` setting. If a request takes longer - than this number of seconds a `408 Request Timeout` response will be returned. +- Add setting which allows setting a timeout on HTTP requests This is configured with the new `REQUEST_TIMEOUT_SECONDS` setting. If a request takes longer than this number of seconds a `408 Request Timeout` response will be returned. - Deprecate [Bintray] service [#6423](https://github.com/badges/shields/issues/6423) - Support git hash in [nexus] SNAPSHOT version [#6369](https://github.com/badges/shields/issues/6369) - Replace 4183C4 with blue [#6366](https://github.com/badges/shields/issues/6366) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 0d618ae3eb98f..0a6cd13cb5537 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,128 +2,80 @@ ## Our Pledge -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards -Examples of behavior that contributes to a positive environment for our -community include: +Examples of behavior that contributes to a positive environment for our community include: - Demonstrating empathy and kindness toward other people - Being respectful of differing opinions, viewpoints, and experiences - Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the - overall community +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -- The use of sexualized language or imagery, and sexual attention or - advances of any kind +- The use of sexualized language or imagery, and sexual attention or advances of any kind - Trolling, insulting or derogatory comments, and personal or political attacks - Public or private harassment -- Publishing others' private information, such as a physical or email - address, without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting +- Publishing others' private information, such as a physical or email address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -![](https://img.shields.io/badge/conduct-%40shields.io-blue) or directly to [@calebcartwright](https://github.com/calebcartwright) ![](https://img.shields.io/badge/caleb-%40shields.io-blue) or [@paulmelnikow](https://github.com/paulmelnikow) ![](https://img.shields.io/badge/paul-%40shields.io-blue) +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at ![](https://img.shields.io/badge/conduct-%40shields.io-blue) or directly to [@calebcartwright](https://github.com/calebcartwright) ![](https://img.shields.io/badge/caleb-%40shields.io-blue) or [@paulmelnikow](https://github.com/paulmelnikow) ![](https://img.shields.io/badge/paul-%40shields.io-blue) All complaints will be reviewed and investigated promptly and fairly. -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. +All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning -**Community Impact**: A violation through a single incident or series -of actions. +**Community Impact**: A violation through a single incident or series of actions. -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. -**Consequence**: A permanent ban from any sort of public interaction within -the community. +**Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d949a8d12fb63..5819289807547 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,22 +1,16 @@ # Contributing to Shields -Shields is a community project. We invite your participation through -financial contributions, issues, and pull requests! +Shields is a community project. We invite your participation through financial contributions, issues, and pull requests! ## Ways you can help ### Financial contributions -We welcome financial contributions in full transparency on our -[open collective](https://opencollective.com/shields). Anyone can file an -expense. If the expense makes sense for the development of the community, it -will be "merged" into the ledger of our open collective by the core -contributors and the person who filed the expense will be reimbursed. +We welcome financial contributions in full transparency on our [open collective](https://opencollective.com/shields). ### Contributing code -This project has quite a backlog of suggestions! If you're new to the project, -maybe you'd like to open a pull request to address one of them: +This project has quite a backlog of suggestions! If you're new to the project, maybe you'd like to open a pull request to address one of them: [![GitHub issues by-label](https://img.shields.io/github/issues/badges/shields/good%20first%20issue.svg)](https://github.com/badges/shields/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) @@ -27,34 +21,22 @@ You can help by improving the project's usage and developer instructions. Tutorials are in [/doc](https://github.com/badges/shields/tree/master/doc): - When you read the documentation, you can fix mistakes and add your own thoughts. -- When your pull request follows the documentation but the practice changed, - consider pointing this out and change the documentation for the next person. +- When your pull request follows the documentation but the practice changed, consider pointing this out and change the documentation for the next person. API documentation is at [contributing.shields.io](https://contributing.shields.io/): -- This documentation is generated by annotating the code with - [JSDoc](https://jsdoc.app/about-getting-started.html) comments. - [Example](https://github.com/badges/shields/blob/b3be4d94d5ef570b8daccfd088c343a958988843/core/base-service/base-json.js#L26-L41) -- Adding a JSDoc comment to some existing code is a great first contribution - and a good way to familiarize yourself with the codebase +- This documentation is generated by annotating the code with [JSDoc](https://jsdoc.app/about-getting-started.html) comments. [Example](https://github.com/badges/shields/blob/b3be4d94d5ef570b8daccfd088c343a958988843/core/base-service/base-json.js#L26-L41) +- Adding a JSDoc comment to some existing code is a great first contribution and a good way to familiarize yourself with the codebase ### Helping others -You can help with code review, which reduces bugs, and over time has a -wonderful side effect of making the code more readable and therefore more -approachable. It's also a great way to teach and learn. Feel free to jump in! -Be welcoming, appreciative, and helpful. You can perform first reviews of -simple changes, like badge additions. These are usually tagged with -[service badge][service badge pr tag]. +You can help with code review, which reduces bugs, and over time has a wonderful side effect of making the code more readable and therefore more approachable. It's also a great way to teach and learn. Feel free to jump in! Be welcoming, appreciative, and helpful. You can perform first reviews of simple changes, like badge additions. These are usually tagged with [service badge][service badge pr tag]. Please review [these impeccable guidelines][code review guidelines]. -You can monitor [issues][], [discussions][] and the [chat room][], and help -other people who have questions about contributing to Shields, or using it -for their projects. +You can monitor [issues][], [discussions][] and the [chat room][], and help other people who have questions about contributing to Shields, or using it for their projects. -Feel free to reach out to one of the [maintainers][] -if you need help getting started. +Feel free to reach out to one of the [maintainers][] if you need help getting started. [service badge pr tag]: https://github.com/badges/shields/pulls?q=is%3Apr+is%3Aopen+label%3Aservice-badge [code review guidelines]: https://kickstarter.engineering/a-guide-to-mindful-communication-in-code-reviews-48aab5282e5e @@ -65,51 +47,45 @@ if you need help getting started. ### Suggesting improvements -There are _a lot_ of suggestions on file. You can help by weighing in on these -suggestions, which helps convey community need to other contributors who might -pick them up. +There are _a lot_ of suggestions on file. You can help by weighing in on these suggestions, which helps convey community need to other contributors who might pick them up. -There is no need to post a new comment. Just add a :thumbsup: or :heart: to -the top post. +There is no need to post a new comment. Just add a :thumbsup: or :heart: to the top post. -If you have a suggestion of your own, [search the open issues][issues]. If you -don't see it, feel free to [open a new issue][open an issue]. +If you have a suggestion of your own, [search the open issues][issues]. If you don't see it, feel free to [open a new issue][open an issue]. [open an issue]: https://github.com/badges/shields/issues/new/choose +### Requesting new logos + +We consume logos via [the SimpleIcons project][simple-icons github], and encourage you to contribute logos there. Please review their [guidance][simple-icons contributing] before doing so. + +[simple-icons github]: https://github.com/simple-icons/simple-icons +[simple-icons contributing]: https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md + ### Spreading the word Feel free to star the repository. This will help increase the visibility of the project, therefore attracting more users and contributors to Shields! -We're also asking for [one-time \$10 donations](https://opencollective.com/shields) from developers who use and love Shields, please spread the word! +We're also asking for [donations](https://opencollective.com/shields) from developers who use and love Shields, please spread the word! ## Getting help There are three places to get help: 1. If you're new to the project, a good place to start is the [tutorial][]. -2. If you need help getting started or implementing a change, [start a discussion][discussions] - with your question. We promise it's okay to do that. If there is already an - issue open for the feature you're working on, you can post there directly. +2. If you need help getting started or implementing a change, [start a discussion][discussions] with your question. We promise it's okay to do that. If there is already an issue open for the feature you're working on, you can post there directly. 3. You can also join the [chat room][] and ask your question there. [tutorial]: doc/TUTORIAL.md ## Badge guidelines -- Shields.io hosts integrations for services which are primarily - used by developers or which are widely used by developers. -- The left-hand side of a badge should not advertise. It should be a lowercase _noun_ - succinctly describing the meaning of the right-hand side. -- Except for badges using the `social` style, logos and links should be _turned off by - default_. +- Shields.io hosts integrations for services which are primarily used by developers or which are widely used by developers. +- The left-hand side of a badge should not advertise. It should be a lowercase _noun_ succinctly describing the meaning of the right-hand side. +- Except for badges using the `social` style, logos and links should be _turned off by default_. - Badges should not obtain data from undocumented or reverse-engineered API endpoints. -- Badges should not obtain data by scraping web pages - these are likely to break frequently. - Whereas API publishers are incentivised to maintain a stable platform for their users, - authors of web pages have no such incentive. -- Badges may require users to specify a token in the badge URL as long it is scoped only to - fetching information and doesn't expose any sensitive information. Generating a token with the - correct scope must be clearly documented. +- Badges should not obtain data by scraping web pages - these are likely to break frequently. Whereas API publishers are incentivised to maintain a stable platform for their users, authors of web pages have no such incentive. +- Badges may require users to specify a token in the badge URL as long it is scoped only to fetching information and doesn't expose any sensitive information. Generating a token with the correct scope must be clearly documented. ## Badge URLs @@ -120,23 +96,33 @@ There are three places to get help: ### Prettier -This project formats its source code using Prettier. The most enjoyable way to -use Prettier is to let it format code for you when you save. You can [integrate -it into your editor][integrate prettier]. +This project formats its source code using Prettier. The most enjoyable way to use Prettier is to let it format code for you when you save. You can [integrate it into your editor][integrate prettier]. -Whether you integrate it into your editor or not, a pre-commit hook will run -Prettier before a commit by default. +Whether you integrate it into your editor or not, a pre-commit hook will run Prettier before a commit by default. [integrate prettier]: https://prettier.io/docs/en/editors.html +### Coding style + +This project uses lower camelCase for variable names and function names and client facing parameters. We use PascalCase for class names and service names. + ### Tests -When adding or changing a service [please write tests][service-tests], and ensure the [title of your Pull Requests follows the required conventions](#running-service-tests-in-pull-requests) to ensure your tests are executed. -When changing other code, please add unit tests. +When adding or changing a service [please write tests][service-tests], and ensure the [title of your Pull Requests follows the required conventions](#running-service-tests-in-pull-requests) to ensure your tests are executed. When changing other code, please add unit tests. -To run the integration tests, you must have redis installed and in your PATH. -Use `brew install redis`, `yum install redis`, etc. The test runner will -start the server automatically. +The integration tests are not run by default. For most contributions it is OK to skip these unless you're working directly on the code for storing the GitHub token pool in postgres. + +To run the integration tests: + +- You must have PostgreSQL installed. Use `brew install postgresql`, `apt-get install postgresql`, etc. +- Set a connection string either with an env var `POSTGRES_URL=postgresql://user:pass@127.0.0.1:5432/db_name` or by using + ```yaml + private: + postgres_url: 'postgresql://user:pass@127.0.0.1:5432/db_name' + ``` + in a yaml config file. +- Run `npm run migrate up` to apply DB migrations +- Run `npm run test:integration` to run the tests [service-tests]: https://github.com/badges/shields/blob/master/doc/service-tests.md @@ -144,10 +130,6 @@ start the server automatically. There is a [High-level code walkthrough](doc/code-walkthrough.md) describing the layout of the project. -### Logos - -We have [documentation for logo usage](doc/logos.md) which includes [contribution guidance](doc/logos.md#contributing-logos) - ## Pull Requests All code changes are incorporated via pull requests, and pull requests are always squashed into a single commit on merging. Therefore there's no requirement to squash commits within your PR, but feel free to squash or restructure the commits on your PR branch if you think it will be helpful. PRs with well structured commits are always easier to review! @@ -175,7 +157,4 @@ Note that many services are part of a "family" of related services. Depending on For example, a PR title of **[GitHubForks] Foo** will only run the service tests specifically for the GitHub Forks badge, whereas a title of **[GitHub] Foo** will run the service tests for all of the GitHub badges. -In the rare case when it's necessary to see the output of a full service-test -run in a PR (all 2,000+ tests), include `[*****]` in the title. Unless all the tests pass, the build -will fail, so likely it will be necessary to remove it and re-run the tests -before merging. +In the rare case when it's necessary to see the output of a full service-test run in a PR (all 2,000+ tests), include `[*****]` in the title. Unless all the tests pass, the build will fail, so likely it will be necessary to remove it and re-run the tests before merging. diff --git a/Dockerfile b/Dockerfile index dec19674affde..01ba8b8a94f24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM node:14-alpine AS Builder +FROM node:22-alpine AS builder + +RUN npm install -g "npm@^10" RUN mkdir -p /usr/src/app RUN mkdir /usr/src/app/private @@ -8,23 +10,31 @@ COPY package.json package-lock.json /usr/src/app/ # Without the badge-maker package.json and CLI script in place, `npm ci` will fail. COPY badge-maker /usr/src/app/badge-maker/ -RUN npm install -g "npm@>=7" # We need dev deps to build the front end. We don't need Cypress, though. RUN NODE_ENV=development CYPRESS_INSTALL_BINARY=0 npm ci COPY . /usr/src/app -RUN npm run build -RUN npm prune --production -RUN npm cache clean --force + +RUN npm run build \ + && npm prune --omit=dev --force \ + && rm -rf node_modules/.cache \ + && rm -rf frontend package-lock.json + # Use multi-stage build to reduce size -FROM node:14-alpine +FROM node:22-alpine + +ARG version=dev +ENV DOCKER_SHIELDS_VERSION=$version +LABEL version=$version +LABEL fly.version=$version + # Run the server using production configs. -ENV NODE_ENV production +ENV NODE_ENV=production WORKDIR /usr/src/app -COPY --from=Builder /usr/src/app /usr/src/app +COPY --from=builder --chown=0:0 /usr/src/app /usr/src/app -CMD node server +CMD ["node", "server"] -EXPOSE 80 +EXPOSE 80 443 diff --git a/README.md b/README.md index 6e9e8fb28f072..c8ef3c0199ca5 100644 --- a/README.md +++ b/README.md @@ -3,41 +3,26 @@ height="130">

- - - + - + - - build status - - service-test status + + + + Daily Tests Status coverage - - Total alerts + alt="Code Coverage"> - chat on Discord - - follow on Twitter + Chat on Discord

-This is home to [Shields.io][shields.io], a service for concise, consistent, -and legible badges in SVG and raster format, which can easily be included in -GitHub readmes or any other web page. The service supports dozens of -continuous integration services, package registries, distributions, app -stores, social networks, code coverage services, and code analysis services. -Every month it serves over 770 million images and is used by some of the -world's most popular open-source projects, [VS Code][vscode], [Vue.js][vue] -and [Bootstrap][bootstrap] to name a few. +This is home to [Shields.io][shields.io], a service for concise, consistent, and legible badges in SVG and raster format, which can easily be included in GitHub readmes or any other web page. The service supports dozens of continuous integration services, package registries, distributions, app stores, social networks, code coverage services, and code analysis services. Every month it serves over 1.6 billion images and is used by some of the world's most popular open-source projects, [VS Code][vscode], [Vue.js][vue] and [Bootstrap][bootstrap] to name a few. [vscode]: https://github.com/Microsoft/vscode [vue]: https://github.com/vuejs/vue @@ -68,12 +53,11 @@ This repo hosts: - amount of [Liberapay](https://liberapay.com/) donations per week: ![receives](https://img.shields.io/badge/receives-2.00%20USD%2Fweek-yellow) - Python package downloads: ![downloads](https://img.shields.io/badge/downloads-13k%2Fmonth-brightgreen) - Chrome Web Store extension rating: ![rating](https://img.shields.io/badge/rating-★★★★☆-brightgreen) -- [Uptime Robot](https://uptimerobot.com) percentage: ![uptime](https://img.shields.io/badge/uptime-100%25-brightgreen) +- Uptime Robot uptime percentage: ![uptime](https://img.shields.io/badge/uptime-100%25-brightgreen) -[Make your own badges!][custom badges] -(Quick example: `https://img.shields.io/badge/left-right-f39f37`) +[Make your own badges!][custom badges] (Quick example: `https://img.shields.io/badge/left-right-f39f37`) -[custom badges]: https://shields.io/#your-badge +[custom badges]: https://img.shields.io/badges/static-badge ### Quickstart @@ -83,72 +67,56 @@ Use the button at the bottom to copy your badge url or snippet, which can then b ## Contributing -Shields is a community project. We invite your participation through issues -and pull requests! You can peruse the [contributing guidelines][contributing]. +Shields is a community project. We invite your participation through issues and pull requests! You can peruse the [contributing guidelines][contributing]. When adding or changing a service [please add tests][service-tests]. -This project has quite a backlog of suggestions! If you're new to the project, -maybe you'd like to open a pull request to address one of them. +This project has quite a backlog of suggestions! If you're new to the project, maybe you'd like to open a pull request to address one of them. You can read a [tutorial on how to add a badge][tutorial]. [![GitHub issues by-label](https://img.shields.io/github/issues/badges/shields/good%20first%20issue)](https://github.com/badges/shields/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) +If you intend on reporting or contributing a fix related to security vulnerabilities, please first refer to our [security policy][security]. + [service-tests]: https://github.com/badges/shields/blob/master/doc/service-tests.md [tutorial]: https://github.com/badges/shields/blob/master/doc/TUTORIAL.md [contributing]: https://github.com/badges/shields/blob/master/CONTRIBUTING.md +[security]: https://github.com/badges/shields/blob/master/SECURITY.md ## Development -1. Install Node 14 or later. You can use the [package manager][] of your choice. - Tests need to pass in Node 14 and 16. +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/badges/shields?quickstart=1) + +1. Install Node 22. You can use the [package manager][] of your choice. 2. Clone this repository. 3. Run `npm ci` to install the dependencies. 4. Run `npm start` to start the badge server and the frontend dev server. 5. Open `http://localhost:3000/` to view the frontend. -When server source files change, the badge server should automatically restart -itself (using [nodemon][]). When the frontend files change, the frontend dev -server (`gatsby dev`) should also automatically reload. However the badge -definitions are built only before the server first starts. To regenerate those, -either run `npm run defs` or manually restart the server. - -To debug a badge from the command line, run `npm run badge -- /npm/v/nock`. -It also works with full URLs like -`npm run badge -- https://img.shields.io/npm/v/nock`. +When server source files change, the badge server should automatically restart itself (using [nodemon][]). When the frontend files change, the frontend dev server (`docusaurus start`) should also automatically reload. However the badge definitions are built only before the server first starts. To regenerate those, either run `npm run prestart` or manually restart the server. -Use `npm run debug:server` to start server in debug mode. -[This recipe][nodemon debug] shows how to debug Node.js application in [VS Code][]. +To debug a badge from the command line, run `npm run badge -- /npm/v/nock`. It also works with full URLs like `npm run badge -- https://img.shields.io/npm/v/nock`. -Shields has experimental support for [Gitpod][gitpod], a pre-configured development -environment that runs in your browser. To use Gitpod, click the button below and -sign in with GitHub. Gitpod also offers a browser add-on, though it is not required. -Please report any Gitpod bugs, questions, or suggestions in issue -[#2772](https://github.com/badges/shields/issues/2772). +Use `npm run debug:server` to start server in debug mode. [This recipe][nodemon debug] shows how to debug Node.js application in [VS Code][]. -[![Edit with Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/badges/shields) - -[Snapshot tests][] ensure we don't inadvertently make changes that affect the -SVG or JSON output. When deliberately changing the output, run -`SNAPSHOT_DRY=1 npm run test:package` to preview changes to the saved -snapshots, and `SNAPSHOT_UPDATE=1 npm run test:package` to update them. +[Snapshot tests][] ensure we don't inadvertently make changes that affect the SVG or JSON output. When deliberately changing the output, run `SNAPSHOT_DRY=1 npm run test:package` to preview changes to the saved snapshots, and `SNAPSHOT_UPDATE=1 npm run test:package` to update them. The server can be configured to use [Sentry][] ([configuration][sentry configuration]) and [Prometheus][] ([configuration][prometheus configuration]). -Daily tests, including a full run of the service tests and overall code coverage, are run via [badges/daily-tests][daily-tests]. +Our [full test suite][full test suite] as well as [code coverage][code coverage] are run on a daily basis. [package manager]: https://nodejs.org/en/download/package-manager/ -[gitpod]: https://www.gitpod.io/ [snapshot tests]: https://glebbahmutov.com/blog/snapshot-testing/ [prometheus]: https://prometheus.io/ [prometheus configuration]: https://github.com/badges/shields/blob/master/doc/self-hosting.md#prometheus [sentry]: https://sentry.io/ [sentry configuration]: https://github.com/badges/shields/blob/master/doc/self-hosting.md#sentry -[daily-tests]: https://github.com/badges/daily-tests [nodemon]: https://nodemon.io/ [nodemon debug]: https://github.com/Microsoft/vscode-recipes/tree/master/nodemon [vs code]: https://code.visualstudio.com/ +[full test suite]: https://github.com/badges/shields/actions/workflows/daily-tests.yml +[code coverage]: https://coveralls.io/github/badges/shields ## Hosting your own server @@ -160,36 +128,18 @@ There is documentation about [hosting your own server][self-hosting]. [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) -Status badges are used widely across open-source and private software projects. -Academics have studied the "signal" badges provide about software project -quality. There are many existing libraries for rendering these badges, and -alternatives to the hosted Shields badge service. [awesome-badges][] is a -curated collection of such resources. -[Contributions][contributing to awesome-badges] may be considered there. -(The presence of a project in that collection should not be interpreted as an endorsement nor promotion from the Shields project) +Status badges are used widely across open-source and private software projects. Academics have studied the "signal" badges provide about software project quality. There are many existing libraries for rendering these badges, and alternatives to the hosted Shields badge service. [awesome-badges][] is a curated collection of such resources. [Contributions][contributing to awesome-badges] may be considered there. (The presence of a project in that collection should not be interpreted as an endorsement nor promotion from the Shields project) [awesome-badges]: https://github.com/badges/awesome-badges [contributing to awesome-badges]: https://github.com/badges/awesome-badges/blob/main/CONTRIBUTING.md ## History -b.adge.me was the original website for this service. Heroku back then had a -thing which made it hard to use a toplevel domain with it, hence the odd -domain. It used code developed in 2013 from a library called -[gh-badges][old-gh-badges], both developed by [Thaddée Tyl][espadrine]. -The project merged with shields.io by making it use the b.adge.me code -and closed b.adge.me. +b.adge.me was the original website for this service. Heroku back then had a thing which made it hard to use a toplevel domain with it, hence the odd domain. It used code developed in 2013 from a library called [gh-badges][old-gh-badges], both developed by [Thaddée Tyl][espadrine]. The project merged with shields.io by making it use the b.adge.me code and closed b.adge.me. -The original badge specification was developed in 2013 by -[Olivier Lacan][olivierlacan]. It was inspired by the Travis CI and similar -badges (there were a lot fewer, back then). In 2014 Thaddée Tyl redesigned -it with help from a Travis CI employee and convinced everyone to switch to -it. The old design is what today is called the plastic style; the new one -is the flat style. +The original badge specification was developed in 2013 by [Olivier Lacan][olivierlacan]. It was inspired by the Travis CI and similar badges (there were a lot fewer, back then). In 2014 Thaddée Tyl redesigned it with help from a Travis CI employee and convinced everyone to switch to it. The old design is what today is called the plastic style; the new one is the flat style. -You can read more about [the project's inception][thread], -[the motivation of the SVG badge specification][motivation], and -[the specification itself][spec]. +You can read more about [the project's inception][thread], [the motivation of the SVG badge specification][motivation], and [the specification itself][spec]. [olivierlacan]: https://github.com/olivierlacan [espadrine]: https://github.com/espadrine @@ -202,33 +152,24 @@ You can read more about [the project's inception][thread], Maintainers: -- [calebcartwright](https://github.com/calebcartwright) (core team) -- [chris48s](https://github.com/chris48s) (core team) -- [Daniel15](https://github.com/Daniel15) (core team) -- [paulmelnikow](https://github.com/paulmelnikow) (core team) -- [platan](https://github.com/platan) (core team) -- [PyvesB](https://github.com/PyvesB) (core team) -- [RedSparr0w](https://github.com/RedSparr0w) (core team) - -Operations: - - [calebcartwright](https://github.com/calebcartwright) -- [chris48s](https://github.com/chris48s) +- [jNullj](https://github.com/jnullj) +- [LitoMore](https://github.com/LitoMore) - [paulmelnikow](https://github.com/paulmelnikow) - [PyvesB](https://github.com/PyvesB) Alumni: +- [chris48s](https://github.com/chris48s) +- [Daniel15](https://github.com/Daniel15) - [espadrine](https://github.com/espadrine) - [olivierlacan](https://github.com/olivierlacan) +- [platan](https://github.com/platan) +- [RedSparr0w](https://github.com/RedSparr0w) ## License -All assets and code are under the [CC0 LICENSE](LICENSE) and in the public -domain unless specified otherwise. - -The assets in `logo/` are trademarks of their respective companies and are -under their terms and license. +All assets and code are under the [CC0 LICENSE](LICENSE) and in the public domain unless specified otherwise. ## Community diff --git a/SECURITY.md b/SECURITY.md index 6d4ba715934a5..435da11190632 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,10 +7,10 @@ Please follow this guidance when reporting security issues affecting: - [Shields.io](https://shields.io) - [Raster.shields.io](https://raster.shields.io) - Self-hosted Shields instances -- The [svg-to-image-proxy](https://www.npmjs.com/package/svg-to-image-proxy) NPM package +- The [squint](https://github.com/badges/squint) raster proxy - The [badge-maker](https://www.npmjs.com/package/badge-maker) NPM package -The [gh-badges](https://www.npmjs.com/package/gh-badges) NPM package is now deprecated and will no longer receive fixes for bugs or security issues. +The [gh-badges](https://www.npmjs.com/package/gh-badges) and [svg-to-image-proxy](https://www.npmjs.com/package/svg-to-image-proxy) NPM packages are now deprecated and will no longer receive fixes for bugs or security issues. ## Reporting a Vulnerability @@ -23,3 +23,7 @@ Report security bugs in third-party modules to the person or team maintaining th We aim to patch confirmed vulnerabilities within 90 days or less, disclosing the details of those vulnerabilities when a patch is published. We ask that you refrain from sharing your report with others while we work on our patch. We may want to coordinate an advisory with you to be published simultaneously with the patch, but you are also welcome to self-disclose after 90 days if you prefer. We will never publish information about you or our communications with you without your permission. + +## Bounties + +Everyone who works on shields is an unpaid volunteer. That includes the core team, contributors and people who report security vulnerabilities. This means we are unable to offer bug or security bounties. diff --git a/__snapshots__/make-badge.spec.js b/__snapshots__/make-badge.spec.js index df826a8ca14a3..82df293125ece 100644 --- a/__snapshots__/make-badge.spec.js +++ b/__snapshots__/make-badge.spec.js @@ -1,7 +1,6 @@ exports['The badge generator SVG should match snapshot 1'] = `