Compare commits

..

83 Commits

Author SHA1 Message Date
chris48s
027323d4b3 remove noTestShortcuts 2023-01-16 19:06:23 +00:00
chris48s
2fb9889742 update [githubpipenv] tests/examples (#8797)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 20:37:46 +00:00
dependabot[bot]
5edec9967f chore(deps): bump @renovatebot/ruby-semver from 1.1.7 to 1.1.8 (#8802)
Bumps [@renovatebot/ruby-semver](https://github.com/renovatebot/ruby-semver) from 1.1.7 to 1.1.8.
- [Release notes](https://github.com/renovatebot/ruby-semver/releases)
- [Changelog](https://github.com/renovatebot/ruby-semver/blob/main/.releaserc.json)
- [Commits](https://github.com/renovatebot/ruby-semver/compare/1.1.7...1.1.8)

---
updated-dependencies:
- dependency-name: "@renovatebot/ruby-semver"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 20:32:14 +00:00
dependabot[bot]
47d67b4b19 chore(deps-dev): bump nock from 13.2.9 to 13.3.0 (#8804)
Bumps [nock](https://github.com/nock/nock) from 13.2.9 to 13.3.0.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.2.9...v13.3.0)

---
updated-dependencies:
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 20:28:39 +00:00
dependabot[bot]
2afcdf4ebd chore(deps): bump fast-xml-parser from 4.0.12 to 4.0.13 (#8805)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.0.12 to 4.0.13.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.0.12...v4.0.13)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 20:25:04 +00:00
dependabot[bot]
91d85368bf chore(deps-dev): bump eslint-plugin-react from 7.31.11 to 7.32.0 (#8798)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.31.11 to 7.32.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.31.11...v7.32.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-14 19:20:08 +00:00
dependabot[bot]
1fe60b49e1 chore(deps-dev): bump eslint-plugin-import from 2.26.0 to 2.27.4 (#8807)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.26.0 to 2.27.4.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.26.0...v2.27.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 19:12:38 +00:00
dependabot[bot]
d6c3459803 chore(deps-dev): bump rimraf from 3.0.2 to 4.0.4 (#8806)
Bumps [rimraf](https://github.com/isaacs/rimraf) from 3.0.2 to 4.0.4.
- [Release notes](https://github.com/isaacs/rimraf/releases)
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v3.0.2...v4.0.4)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 19:06:21 +00:00
dependabot[bot]
0d4fcfe880 chore(deps): bump @sentry/node from 7.29.0 to 7.30.0 (#8803)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.29.0 to 7.30.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.29.0...7.30.0)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 19:01:38 +00:00
chris48s
f67fe525c2 fix service test loader on windows, add tests (#8786)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 00:37:25 +00:00
dependabot[bot]
dad6ce554a chore(deps-dev): bump prettier from 2.8.1 to 2.8.2 (#8799)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.1...2.8.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-13 16:48:31 -06:00
Prashant Rawat
0c73b35915 Add docstrings for pipenv helpers (#8787)
* add docstrings for pipenv helpers

* update param description

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2023-01-10 20:49:52 +00:00
chris48s
f1d151e963 migrate danger CI job to GHA (#8477)
* migrate danger CI job to GHA

* constrain triggers

* prettier
2023-01-10 19:39:11 +00:00
James Chen-Smith
a0149a8f8f deprecate [apm] service (#8773)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-07 18:43:10 +00:00
dependabot[bot]
e843d4eac1 chore(deps): bump json5 from v2.2.1 to v2.2.3 (#8785)
Bumps [json5](https://github.com/json5/json5)
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-07 18:27:36 +00:00
dependabot[bot]
830b5d8a1f chore(deps-dev): bump @babel/core from 7.20.7 to 7.20.12 (#8779)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.20.7 to 7.20.12.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.12/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-07 18:18:30 +00:00
dependabot[bot]
8afb034a58 chore(deps-dev): bump cypress from 12.2.0 to 12.3.0 (#8778)
Bumps [cypress](https://github.com/cypress-io/cypress) from 12.2.0 to 12.3.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v12.2.0...v12.3.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-07 18:11:01 +00:00
dependabot[bot]
2f915a7b45 chore(deps-dev): bump @typescript-eslint/eslint-plugin (#8781)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.47.1 to 5.48.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.48.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-06 21:24:46 +00:00
dependabot[bot]
7dbfd0d049 chore(deps): bump @sentry/node from 7.28.1 to 7.29.0 (#8780)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.28.1 to 7.29.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.28.1...7.29.0)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-06 21:21:08 +00:00
dependabot[bot]
493fdb76af chore(deps-dev): bump danger from 11.2.0 to 11.2.1 (#8775)
Bumps [danger](https://github.com/danger/danger-js) from 11.2.0 to 11.2.1.
- [Release notes](https://github.com/danger/danger-js/releases)
- [Changelog](https://github.com/danger/danger-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/danger/danger-js/compare/11.2.0...11.2.1)

---
updated-dependencies:
- dependency-name: danger
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-06 21:16:16 +00:00
dependabot[bot]
abb1bbf8d4 chore(deps): bump prom-client from 14.1.0 to 14.1.1 (#8777)
Bumps [prom-client](https://github.com/siimon/prom-client) from 14.1.0 to 14.1.1.
- [Release notes](https://github.com/siimon/prom-client/releases)
- [Changelog](https://github.com/siimon/prom-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/siimon/prom-client/compare/v14.1.0...v14.1.1)

---
updated-dependencies:
- dependency-name: prom-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-06 21:11:39 +00:00
dependabot[bot]
a4911dac33 chore(deps-dev): bump eslint-config-prettier from 8.5.0 to 8.6.0 (#8774)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.5.0 to 8.6.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.5.0...v8.6.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-06 21:06:11 +00:00
Prashant Rawat
5e6583c530 Docstrings for php-version service (#8766)
* add docstrings for php-version service

* update docstring for resource-cache service

* update docstring param type
2023-01-06 21:01:59 +00:00
Paula Barszcz
bb1fda2aa7 deprecate lgtm; lgtm service tests should be passing (#8771) 2023-01-04 19:48:47 +00:00
github-actions[bot]
606ea0ad54 Changelog for Release server-2023-01-01 (#8765)
* Update Changelog

* Update CHANGELOG.md

Co-authored-by: release[bot] <actions@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2023-01-01 14:15:46 +00:00
chris48s
00e37a6888 migrate frontend tests to GHA (#8541)
* migrate frontend tests to GH actions

* constrain PR events
2022-12-31 20:08:24 +00:00
chris48s
c3d08f7f8b Send X-GitHub-Api-Version when calling [GitHub] v3 API (#8669)
* send X-GitHub-Api-Version when calling GitHub v3 API

* TODO: invesitgate

* read baseUrl from config.service.baseUri

* add workflow to check for new GH api releases on schedule

* format config/default.yml to match yaml.dump() format

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-31 15:56:04 +00:00
dependabot[bot]
8be87554d6 chore(deps): bump simple-icons from 8.1.0 to 8.2.0 (#8761)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 8.1.0 to 8.2.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/8.1.0...8.2.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-31 15:49:16 +00:00
dependabot[bot]
df4c6d14dd chore(deps): bump fast-json-patch from 3.0.0-1 to 3.1.1 (#8763)
Bumps [fast-json-patch](https://github.com/Starcounter-Jack/JSON-Patch) from 3.0.0-1 to 3.1.1.
- [Release notes](https://github.com/Starcounter-Jack/JSON-Patch/releases)
- [Commits](https://github.com/Starcounter-Jack/JSON-Patch/compare/3.0.0-1...3.1.1)

---
updated-dependencies:
- dependency-name: fast-json-patch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-31 15:44:09 +00:00
dependabot[bot]
5830810451 chore(deps-dev): bump @typescript-eslint/eslint-plugin (#8762)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.47.0 to 5.47.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.47.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-31 15:37:47 +00:00
anatawa12
ac2ae0c180 add [VpmVersion] badge (#8755)
* feat: add vpm version badge

* chore: remove sort parameter

* chore: rename repositoryUrl -> repository_url

* fix: test data

* chore: add include_prereleases

* chore: versions requires at least one element

* chore: add example badge for include_prereleases

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-12-31 15:33:24 +00:00
Pierce Thompson
efd707eb65 Add [modrinth] game versions (#8673)
* Add a Modrinth game versions badge

* Require at least one game version

* Code style

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-31 15:24:31 +00:00
chris48s
f67251a9ca don't try to call .entries on null or undefined (#8757) 2022-12-29 16:54:11 +00:00
chris48s
00f35c67e8 fix debug logging of undefined query params (#8540) 2022-12-28 19:54:11 +00:00
dependabot[bot]
7a38cfe099 chore(deps-dev): bump @typescript-eslint/eslint-plugin (#8745)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.46.0 to 5.47.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.47.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-23 15:55:31 +00:00
dependabot[bot]
b32dc3e894 chore(deps): bump query-string from 8.0.3 to 8.1.0 (#8748)
Bumps [query-string](https://github.com/sindresorhus/query-string) from 8.0.3 to 8.1.0.
- [Release notes](https://github.com/sindresorhus/query-string/releases)
- [Commits](https://github.com/sindresorhus/query-string/compare/v8.0.3...v8.1.0)

---
updated-dependencies:
- dependency-name: query-string
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-23 15:44:07 +00:00
dependabot[bot]
e8798a437a chore(deps-dev): bump @babel/core from 7.20.5 to 7.20.7 (#8749)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.20.5 to 7.20.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-23 15:37:50 +00:00
dependabot[bot]
80ffafc422 chore(deps-dev): bump cypress from 12.1.0 to 12.2.0 (#8746)
Bumps [cypress](https://github.com/cypress-io/cypress) from 12.1.0 to 12.2.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v12.1.0...v12.2.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-23 15:31:30 +00:00
dependabot[bot]
8808e0dd7b chore(deps): bump @sentry/node from 7.26.0 to 7.28.1 (#8747)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.26.0 to 7.28.1.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.26.0...7.28.1)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-23 15:25:30 +00:00
chris48s
146598f5f4 run close-bot on node 16 (#8740)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-22 21:36:57 +00:00
chris48s
41c53c73c2 allow all numeric branch names in [githubactionsworkflowstatus] (#8734) 2022-12-21 17:49:20 +00:00
chris48s
dd3e2df00a switch [GithubActionsWorkflowStatus] to SVG scraper (#8738) 2022-12-21 17:17:18 +00:00
dependabot[bot]
271547d2c6 chore(deps): bump query-string from 7.1.3 to 8.0.3 (#8728)
* chore(deps): bump query-string from 7.1.3 to 8.0.3

Bumps [query-string](https://github.com/sindresorhus/query-string) from 7.1.3 to 8.0.3.
- [Release notes](https://github.com/sindresorhus/query-string/releases)
- [Commits](https://github.com/sindresorhus/query-string/compare/v7.1.3...v8.0.3)

---
updated-dependencies:
- dependency-name: query-string
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update import

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris48s <git@chris-shaw.dev>
2022-12-19 18:53:21 +00:00
dependabot[bot]
300871ac65 chore(deps-dev): bump mocha from 10.1.0 to 10.2.0 (#8731)
Bumps [mocha](https://github.com/mochajs/mocha) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.1.0...v10.2.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-19 18:43:38 +00:00
dependabot[bot]
af25802b68 chore(deps): bump @sentry/node from 7.24.2 to 7.26.0 (#8729)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.24.2 to 7.26.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.24.2...7.26.0)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-19 18:38:53 +00:00
dependabot[bot]
5caab6724f chore(deps): bump simple-icons from 8.0.0 to 8.1.0 (#8724)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 8.0.0 to 8.1.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/8.0.0...8.1.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-19 18:33:58 +00:00
dependabot[bot]
73b8e78143 chore(deps): bump camelcase from 7.0.0 to 7.0.1 (#8725)
Bumps [camelcase](https://github.com/sindresorhus/camelcase) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/sindresorhus/camelcase/releases)
- [Commits](https://github.com/sindresorhus/camelcase/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: camelcase
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19 18:28:37 +00:00
dependabot[bot]
022fe54141 chore(deps-dev): bump sinon from 15.0.0 to 15.0.1 (#8730)
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.0.0 to 15.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.0.0...v15.0.1)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-19 18:22:28 +00:00
dependabot[bot]
06cdf34c3d chore(deps-dev): bump cypress from 12.0.2 to 12.1.0 (#8723)
Bumps [cypress](https://github.com/cypress-io/cypress) from 12.0.2 to 12.1.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v12.0.2...v12.1.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19 18:13:43 +00:00
chris48s
6049ef64c8 handle workflow runs that do not have a conclusion (#8717)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-15 22:41:33 +00:00
chris48s
a276770cdb add a clarifying comment to [pypi] getLicenses (#8718) 2022-12-15 22:36:46 +00:00
chris48s
61dd6c0443 switch from github workflows to github actions workflows; test [githubactionsworkflowstatus githubworkflowstatus] (#8475)
* switch from github workflows to github actions workflows

* update github actions workflow badge to use api

* add test case for missing branch param

* custom deprecation message
2022-12-15 18:36:17 +00:00
dependabot[bot]
2d254acd20 chore(deps-dev): bump snap-shot-it from 7.9.6 to 7.9.10 (#8711)
Bumps [snap-shot-it](https://github.com/bahmutov/snap-shot-it) from 7.9.6 to 7.9.10.
- [Release notes](https://github.com/bahmutov/snap-shot-it/releases)
- [Commits](https://github.com/bahmutov/snap-shot-it/compare/v7.9.6...v7.9.10)

---
updated-dependencies:
- dependency-name: snap-shot-it
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-12 09:54:15 +00:00
dependabot[bot]
2e18afc062 chore(deps): bump simple-icons from 7.21.0 to 8.0.0 (#8702)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 7.21.0 to 8.0.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/7.21.0...8.0.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-12 09:49:22 +00:00
dependabot[bot]
ddd25e0d47 chore(deps-dev): bump gatsby-plugin-page-creator from 4.24.0 to 4.25.0 (#8691)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 4.24.0 to 4.25.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-page-creator/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-page-creator@4.25.0/packages/gatsby-plugin-page-creator)

---
updated-dependencies:
- dependency-name: gatsby-plugin-page-creator
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-12 09:44:26 +00:00
dependabot[bot]
7d2d930486 chore(deps-dev): bump @typescript-eslint/eslint-plugin (#8703)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.45.0 to 5.46.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.46.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 09:39:54 +00:00
dependabot[bot]
c26b90f4e7 chore(deps): bump express from 4.17.2 to 4.18.2 (#8707)
Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.2...4.18.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 22:20:28 +00:00
dependabot[bot]
eef6057c78 chore(deps-dev): bump lint-staged from 13.0.4 to 13.1.0 (#8694)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.4 to 13.1.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.0.4...v13.1.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 22:15:12 +00:00
dependabot[bot]
a67dda19bc chore(deps-dev): bump typescript from 4.9.3 to 4.9.4 (#8698)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.3 to 4.9.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.3...v4.9.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 22:09:46 +00:00
dependabot[bot]
e1622e800c chore(deps-dev): bump gatsby-plugin-catch-links from 4.19.0 to 4.25.0 (#8696)
Bumps [gatsby-plugin-catch-links](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-catch-links) from 4.19.0 to 4.25.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-catch-links/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-catch-links@4.25.0/packages/gatsby-plugin-catch-links)

---
updated-dependencies:
- dependency-name: gatsby-plugin-catch-links
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 22:04:43 +00:00
dependabot[bot]
5e78eccf56 chore(deps-dev): bump start-server-and-test from 1.14.0 to 1.15.2 (#8704)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 1.14.0 to 1.15.2.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v1.14.0...v1.15.2)

---
updated-dependencies:
- dependency-name: start-server-and-test
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 22:00:12 +00:00
dependabot[bot]
7207df085d chore(deps): bump @sentry/node from 7.23.0 to 7.24.2 (#8692)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.23.0 to 7.24.2.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.23.0...7.24.2)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 21:55:25 +00:00
dependabot[bot]
367b83b0b6 chore(deps): bump chalk from 5.1.2 to 5.2.0 (#8699)
Bumps [chalk](https://github.com/chalk/chalk) from 5.1.2 to 5.2.0.
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](https://github.com/chalk/chalk/compare/v5.1.2...v5.2.0)

---
updated-dependencies:
- dependency-name: chalk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 21:50:48 +00:00
dependabot[bot]
908cc8de93 chore(deps-dev): bump prettier from 2.8.0 to 2.8.1 (#8693)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.0...2.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 21:45:54 +00:00
dependabot[bot]
4d785cd459 chore(deps-dev): bump gatsby-plugin-typescript from 4.23.0 to 4.25.0 (#8700)
Bumps [gatsby-plugin-typescript](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-typescript) from 4.23.0 to 4.25.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-typescript/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-typescript@4.25.0/packages/gatsby-plugin-typescript)

---
updated-dependencies:
- dependency-name: gatsby-plugin-typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 21:41:15 +00:00
dependabot[bot]
8dcd0d1ffd chore(deps-dev): bump gatsby-plugin-react-helmet from 5.22.0 to 5.25.0 (#8697)
Bumps [gatsby-plugin-react-helmet](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-react-helmet) from 5.22.0 to 5.25.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-react-helmet/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-react-helmet@5.25.0/packages/gatsby-plugin-react-helmet)

---
updated-dependencies:
- dependency-name: gatsby-plugin-react-helmet
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 21:35:13 +00:00
dependabot[bot]
8754ac3798 chore(deps-dev): bump @typescript-eslint/parser from 5.42.0 to 5.46.0 (#8705)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.42.0 to 5.46.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.46.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 21:30:31 +00:00
dependabot[bot]
93016b04ff chore(deps-dev): bump cypress from 11.2.0 to 12.0.2 (#8701)
Bumps [cypress](https://github.com/cypress-io/cypress) from 11.2.0 to 12.0.2.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v11.2.0...v12.0.2)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-11 21:23:12 +00:00
dependabot[bot]
b6be37d277 chore(deps): bump dayjs from 1.11.6 to 1.11.7 (#8706)
Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.6 to 1.11.7.
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/v1.11.7/CHANGELOG.md)
- [Commits](https://github.com/iamkun/dayjs/compare/v1.11.6...v1.11.7)

---
updated-dependencies:
- dependency-name: dayjs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-10 13:07:10 +00:00
chris48s
4da9e7d58f fall back to classifiers if license text is really long (#8690) 2022-12-10 13:02:14 +00:00
chris48s
affae9c521 docs/issue template improvements for badge requests (#8668)
* docs/issue template improvements for badge requests

* split markdown over multiple line, switch to folded multi-line string

* quotes round 'for the badge'

* fix typo

* improve docs on auth strategies

* document logoColor param in logos.md
2022-12-07 19:43:12 +00:00
dependabot[bot]
73bbe80eaa chore(deps): bump query-string from 7.1.1 to 7.1.3 (#8685)
Bumps [query-string](https://github.com/sindresorhus/query-string) from 7.1.1 to 7.1.3.
- [Release notes](https://github.com/sindresorhus/query-string/releases)
- [Commits](https://github.com/sindresorhus/query-string/compare/v7.1.1...v7.1.3)

---
updated-dependencies:
- dependency-name: query-string
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-04 14:35:36 +00:00
dependabot[bot]
9cd16402db chore(deps): bump simple-icons from 7.20.0 to 7.21.0 (#8684)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 7.20.0 to 7.21.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/7.20.0...7.21.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:49:46 +00:00
dependabot[bot]
c49ee023dd chore(deps-dev): bump @babel/core from 7.20.2 to 7.20.5 (#8676)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.20.2 to 7.20.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.20.5/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:43:36 +00:00
dependabot[bot]
e2fcd1787b chore(deps-dev): bump sinon from 14.0.2 to 15.0.0 (#8680)
Bumps [sinon](https://github.com/sinonjs/sinon) from 14.0.2 to 15.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v14.0.2...v15.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:37:53 +00:00
dependabot[bot]
c008dcfbb6 chore(deps-dev): bump eslint-plugin-sort-class-members (#8679)
Bumps [eslint-plugin-sort-class-members](https://github.com/bryanrsmith/eslint-plugin-sort-class-members) from 1.15.2 to 1.16.0.
- [Release notes](https://github.com/bryanrsmith/eslint-plugin-sort-class-members/releases)
- [Commits](https://github.com/bryanrsmith/eslint-plugin-sort-class-members/compare/v1.15.2...v1.16.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-sort-class-members
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:32:30 +00:00
dependabot[bot]
d769de309e chore(deps-dev): bump tsd from 0.24.1 to 0.25.0 (#8682)
Bumps [tsd](https://github.com/SamVerschueren/tsd) from 0.24.1 to 0.25.0.
- [Release notes](https://github.com/SamVerschueren/tsd/releases)
- [Commits](https://github.com/SamVerschueren/tsd/compare/v0.24.1...v0.25.0)

---
updated-dependencies:
- dependency-name: tsd
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:27:39 +00:00
dependabot[bot]
478c0545ac chore(deps-dev): bump @typescript-eslint/eslint-plugin (#8678)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.44.0 to 5.45.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.45.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:21:59 +00:00
dependabot[bot]
ac1a4d4587 chore(deps-dev): bump @types/mocha from 10.0.0 to 10.0.1 (#8681)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 10.0.0 to 10.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

---
updated-dependencies:
- dependency-name: "@types/mocha"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:17:08 +00:00
dependabot[bot]
882fb9d267 chore(deps-dev): bump @types/react-helmet from 6.1.5 to 6.1.6 (#8675)
Bumps [@types/react-helmet](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-helmet) from 6.1.5 to 6.1.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-helmet)

---
updated-dependencies:
- dependency-name: "@types/react-helmet"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:12:06 +00:00
dependabot[bot]
2cdd89e8a2 chore(deps): bump @sentry/node from 7.21.1 to 7.23.0 (#8674)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.21.1 to 7.23.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.21.1...7.23.0)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 13:03:33 +00:00
dependabot[bot]
eefb16a6ec chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#8672)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-12-04 12:56:03 +00:00
chris48s
53c5cfa94d allow passing key to [stackexchange] (#8539)
* refactoring groundwork

* add stackapps_api_key setting

* add test for stackexchange auth

* clarify docs

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-04 10:53:59 +00:00
61 changed files with 2561 additions and 2256 deletions

View File

@@ -26,64 +26,6 @@ services_steps: &services_steps
path: junit
jobs:
danger:
docker:
- image: cimg/node:16.15
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: cimg/node:16.15
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
services:
docker:
- image: cimg/node:16.15
@@ -103,10 +45,6 @@ workflows:
on-commit:
jobs:
- frontend:
filters:
branches:
ignore: gh-pages
- services:
filters:
branches:
@@ -119,22 +57,12 @@ workflows:
ignore:
- master
- gh-pages
- danger:
filters:
branches:
ignore:
- master
- gh-pages
- /dependabot\/.*/
# on-commit-with-cache:
# jobs:
# - npm-install:
# filters:
# branches:
# ignore: gh-pages
# - frontend:
# requires:
# - npm-install
# - services:
# requires:
# - npm-install
@@ -147,9 +75,3 @@ workflows:
# filters:
# branches:
# ignore: master
# - danger:
# requires:
# - npm-install
# filters:
# branches:
# ignore: /dependabot\/.*/

View File

@@ -1,37 +0,0 @@
---
name: 💡 Badge Request
about: Ideas for new badges
labels: 'service-badge'
---
:clipboard: **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)
-->
:link: **Data**
<!--
Where can we get the data from?
- Is there a public API?
- Does the API require an API key?
- Link to the API documentation.
-->
:microphone: **Motivation**
<!--
Please explain why this feature should be implemented and how it would be used.
- What is the specific use case?
-->
<!-- Love Shields? Please consider donating $10 to sustain our activities:
👉 https://opencollective.com/shields -->

View File

@@ -0,0 +1,62 @@
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://github.com/badges/shields/blob/master/doc/static-badges.md).
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/#your-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 $10 to sustain our activities: [https://opencollective.com/shields](https://opencollective.com/shields)

View File

@@ -8,5 +8,5 @@ inputs:
description: 'The GITHUB_TOKEN secret'
required: true
runs:
using: 'node12'
using: 'node16'
main: 'index.js'

View File

@@ -0,0 +1,31 @@
name: 'Frontend tests'
description: 'Run frontend tests and check types'
runs:
using: 'composite'
steps:
- name: Prepare frontend tests
if: always()
run: npm run defs && npm run features
shell: bash
- name: Tests
if: always()
run: npm run test:frontend -- --reporter json --reporter-option 'output=reports/frontend-tests.json'
shell: bash
- name: Type Checks
if: always()
run: |
set -o pipefail
npm run check-types:frontend 2>&1 | tee reports/frontend-types.txt
shell: bash
- name: Write Markdown Summary
if: always()
run: |
node scripts/mocha2md.js 'Frontend Tests' reports/frontend-tests.json >> $GITHUB_STEP_SUMMARY
echo '# Frontend Types' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat reports/frontend-types.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
shell: bash

29
.github/workflows/danger.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Danger
on:
pull_request_target:
types: [opened, edited, reopened, synchronize]
permissions:
checks: write
pull-requests: write
statuses: write
jobs:
danger:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 16
- name: Danger
run: npm run danger ci
env:
# https://github.com/gatsbyjs/gatsby/pull/11555
NODE_ENV: test
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

26
.github/workflows/test-frontend.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Frontend
on:
pull_request:
types: [opened, edited, reopened, synchronize]
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 16
- name: Frontend tests
uses: ./.github/actions/frontend-tests
- name: Frontend build
run: npm run build

33
.github/workflows/update-github-api.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Update GitHub API Version
on:
schedule:
- cron: '0 7 * * 6'
# At 07:00 on Saturday
workflow_dispatch:
permissions:
pull-requests: write
contents: write
jobs:
update-github-api:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 16
- name: Check for new GitHub API version
run: node scripts/update-github-api.js
- name: Create Pull Request if config has changed
uses: peter-evans/create-pull-request@v4
with:
token: '${{ secrets.GITHUB_TOKEN }}'
commit-message: Update GitHub API Version
title: Update [GitHub] API Version
branch-suffix: random

View File

@@ -4,6 +4,21 @@ Note: this changelog is for the shields.io server. The changelog for the badge-m
---
## 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)

View File

@@ -19,9 +19,6 @@
<a href="https://coveralls.io/github/badges/shields">
<img src="https://img.shields.io/coveralls/github/badges/shields"
alt="coverage"></a>
<a href="https://lgtm.com/projects/g/badges/shields/alerts/">
<img src="https://img.shields.io/lgtm/alerts/g/badges/shields"
alt="Total alerts"/></a>
<a href="https://discord.gg/HjJCwm5">
<img src="https://img.shields.io/discord/308323056592486420?logo=discord"
alt="chat on Discord"></a>

View File

@@ -98,6 +98,7 @@ private:
sl_insight_userUuid: 'SL_INSIGHT_USER_UUID'
sl_insight_apiToken: 'SL_INSIGHT_API_TOKEN'
sonarqube_token: 'SONARQUBE_TOKEN'
stackapps_api_key: 'STACKAPPS_API_KEY'
teamcity_user: 'TEAMCITY_USER'
teamcity_pass: 'TEAMCITY_PASS'
twitch_client_id: 'TWITCH_CLIENT_ID'

View File

@@ -1,7 +1,6 @@
public:
bind:
address: '::'
metrics:
prometheus:
enabled: false
@@ -12,33 +11,26 @@ public:
intervalSeconds: 15
ssl:
isSecure: false
cors:
allowedOrigin: []
services:
github:
baseUri: 'https://api.github.com/'
baseUri: 'https://api.github.com'
debug:
enabled: false
intervalSeconds: 200
restApiVersion: '2022-11-28'
obs:
authorizedOrigins: 'https://api.opensuse.org'
weblate:
authorizedOrigins: 'https://hosted.weblate.org'
trace: false
cacheHeaders:
defaultCacheLengthSeconds: 120
handleInternalErrors: true
fetchLimit: '10MB'
userAgentBase: 'shields (self-hosted)'
requestTimeoutSeconds: 120
requestTimeoutMaxAgeSeconds: 30
requireCloudflare: false
private: {}

View File

@@ -221,8 +221,14 @@ class BaseService {
const logTrace = (...args) => trace.logTrace('fetch', ...args)
let logUrl = url
const logOptions = Object.assign({}, options)
if ('searchParams' in options) {
const params = new URLSearchParams(options.searchParams)
if ('searchParams' in options && options.searchParams != null) {
const params = new URLSearchParams(
Object.fromEntries(
Object.entries(options.searchParams).filter(
([k, v]) => v !== undefined
)
)
)
logUrl = `${url}?${params.toString()}`
delete logOptions.searchParams
}

View File

@@ -440,14 +440,21 @@ describe('BaseService', function () {
)
const url = 'some-url'
const options = { headers: { Cookie: 'some-cookie' } }
const options = {
headers: { Cookie: 'some-cookie' },
searchParams: { param1: 'foobar', param2: undefined },
}
await serviceInstance._request({ url, options })
expect(trace.logTrace).to.be.calledWithMatch(
'fetch',
sinon.match.string,
'Request',
`${url}\n${JSON.stringify(options, null, 2)}`
`${url}?param1=foobar\n${JSON.stringify(
{ headers: options.headers },
null,
2
)}`
)
expect(trace.logTrace).to.be.calledWithMatch(
'fetch',

View File

@@ -27,11 +27,13 @@ class InvalidService extends Error {
}
}
function getServicePaths(pattern) {
return glob.sync(toUnixPath(path.join(serviceDir, '**', pattern)))
}
async function loadServiceClasses(servicePaths) {
if (!servicePaths) {
servicePaths = glob.sync(
toUnixPath(path.join(serviceDir, '**', '*.service.js'))
)
servicePaths = getServicePaths('*.service.js')
}
const serviceClasses = []
@@ -102,15 +104,16 @@ async function collectDefinitions() {
async function loadTesters() {
return Promise.all(
glob
.sync(path.join(serviceDir, '**', '*.tester.js'))
.map(async path => await import(`file://${path}`))
getServicePaths('*.tester.js').map(
async path => await import(`file://${path}`)
)
)
}
export {
InvalidService,
loadServiceClasses,
getServicePaths,
checkNames,
collectDefinitions,
loadTesters,

View File

@@ -2,7 +2,11 @@ import path from 'path'
import { fileURLToPath } from 'url'
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'
import { loadServiceClasses, InvalidService } from './loader.js'
import {
loadServiceClasses,
getServicePaths,
InvalidService,
} from './loader.js'
chai.use(chaiAsPromised)
const { expect } = chai
@@ -65,3 +69,15 @@ describe('loadServiceClasses function', function () {
).to.eventually.have.length(5)
})
})
describe('getServicePaths', function () {
// these tests just make sure we discover a
// plausibly large number of .service and .tester files
it('finds a non-zero number of services in the project', function () {
expect(getServicePaths('*.service.js')).to.have.length.above(400)
})
it('finds a non-zero number of testers in the project', function () {
expect(getServicePaths('*.tester.js')).to.have.length.above(400)
})
})

View File

@@ -14,14 +14,16 @@ let resourceCache = Object.create(null)
/**
* Make a HTTP request using an in-memory cache
*
* @param {object} attrs Refer to individual attrs
* @param {string} attrs.url URL to request
* @param {number} attrs.ttl Number of milliseconds to keep cached value for
* @param {boolean} [attrs.json=true] True if we expect to parse the response as JSON
* @param {Function} [attrs.scraper=buffer => buffer] Function to extract value from the response
* @param {object} [attrs.options={}] Options to pass to got
* @param {Function} [attrs.requestFetcher=fetch] Custom fetch function
* @returns {*} Parsed response
* @async
* @param {object} attrs - Refer to individual attrs
* @param {string} attrs.url - URL to request
* @param {number} attrs.ttl - Number of milliseconds to keep cached value for
* @param {boolean} [attrs.json=true] - True if we expect to parse the response as JSON
* @param {Function} [attrs.scraper=buffer => buffer] - Function to extract value from the response
* @param {object} [attrs.options={}] - Options to pass to got
* @param {Function} [attrs.requestFetcher=fetch] - Custom fetch function
* @throws {InvalidResponse} - Error if unable to parse response
* @returns {Promise<*>} Promise that resolves to parsed response
*/
async function getCachedResource({
url,

View File

@@ -126,6 +126,7 @@ const publicConfigSchema = Joi.object({
enabled: Joi.boolean().required(),
intervalSeconds: Joi.number().integer().min(1).required(),
},
restApiVersion: Joi.date().raw().required(),
},
gitlab: defaultService,
jira: defaultService,
@@ -186,6 +187,7 @@ const privateConfigSchema = Joi.object({
sl_insight_userUuid: Joi.string(),
sl_insight_apiToken: Joi.string(),
sonarqube_token: Joi.string(),
stackapps_api_key: Joi.string(),
teamcity_user: Joi.string(),
teamcity_pass: Joi.string(),
twitch_client_id: Joi.string(),

View File

@@ -11,7 +11,6 @@
// DANGER_GITHUB_API_TOKEN=your-github-api-token npm run danger -- pr https://github.com/badges/shields/pull/2665
const { danger, fail, message, warn } = require('danger')
const { default: noTestShortcuts } = require('danger-plugin-no-test-shortcuts')
const { fileMatch } = danger.git
const documentation = fileMatch(
@@ -173,11 +172,3 @@ affectedServices.forEach(service => {
)
}
})
// Prevent merging exclusive services tests.
noTestShortcuts({
testFilePredicate: filePath => filePath.endsWith('.tester.js'),
patterns: {
only: ['only()'],
},
})

8
doc/authentication.md Normal file
View File

@@ -0,0 +1,8 @@
# Badges Requiring Authentication
There are two patterns for how shields.io can interact with APIs that require auth:
1. We can store one token at the service level which allows us to read public data for everyone's projects, or lift a rate limit. If you are looking for information on configuring credentials for a self-hosted instance see https://github.com/badges/shields/blob/master/doc/server-secrets.md
2. If every user needs to provide their own token, that has to be a token which can be passed to us as a query param in the badge URL. This means it must be possible to generate a key or token that can be exposed in a public github README public with no negative consequences. (i.e: that key or token only exposes public metrics).
If every user would need to supply their own token for some particular service and it is only possible to generate a key or token which allows access to sensitive data or allows write access to resources, we can't provide an integration for this service.

View File

@@ -22,6 +22,18 @@ Any custom logo can be passed in a URL parameter by base64 encoding it. e.g:
![](https://img.shields.io/badge/play-station-blue.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48cGF0aCBkPSJNMTI5IDExMWMtNTUgNC05MyA2Ni05MyA3OEwwIDM5OGMtMiA3MCAzNiA5MiA2OSA5MWgxYzc5IDAgODctNTcgMTMwLTEyOGgyMDFjNDMgNzEgNTAgMTI4IDEyOSAxMjhoMWMzMyAxIDcxLTIxIDY5LTkxbC0zNi0yMDljMC0xMi00MC03OC05OC03OGgtMTBjLTYzIDAtOTIgMzUtOTIgNDJIMjM2YzAtNy0yOS00Mi05Mi00MmgtMTV6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) - https://img.shields.io/badge/play-station-blue.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48cGF0aCBkPSJNMTI5IDExMWMtNTUgNC05MyA2Ni05MyA3OEwwIDM5OGMtMiA3MCAzNiA5MiA2OSA5MWgxYzc5IDAgODctNTcgMTMwLTEyOGgyMDFjNDMgNzEgNTAgMTI4IDEyOSAxMjhoMWMzMyAxIDcxLTIxIDY5LTkxbC0zNi0yMDljMC0xMi00MC03OC05OC03OGgtMTBjLTYzIDAtOTIgMzUtOTIgNDJIMjM2YzAtNy0yOS00Mi05Mi00MmgtMTV6IiBmaWxsPSIjZmZmIi8+PC9zdmc+
### logoColor parameter
The `logoColor` param can be used to set the color of the logo. Hex, rgb, rgba, hsl, hsla and css named colors can all be used. For SimpleIcons named logos (which are monochrome), the color will be applied to the SimpleIcons logo.
- ![](https://img.shields.io/badge/logo-javascript-blue?logo=javascript) - https://img.shields.io/badge/logo-javascript-blue?logo=javascript
- ![](https://img.shields.io/badge/logo-javascript-blue?logo=javascript&logoColor=f5f5f5) - https://img.shields.io/badge/logo-javascript-blue?logo=javascript&logoColor=f5f5f5
In the case where Shields hosts a custom multi-colored logo, if the `logoColor` param is passed, the corresponding SimpleIcons logo will be substituted and colored.
- ![](https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab) - https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab
- ![](https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab&logoColor=white) - https://img.shields.io/badge/logo-gitlab-blue?logo=gitlab&logoColor=white
## Contributing Logos
Our preferred way to consume icons is via the SimpleIcons logo. As a first port of call, we encourage you to contribute logos to [the SimpleIcons project][simple-icons github]. Please review their [guidance](https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md) before contributing.

View File

@@ -244,6 +244,17 @@ Create an account, sign in and obtain a uuid and token from your
to give your self-hosted Shields installation access to a
private SonarQube instance or private project on a public instance.
### StackApps (for StackExchange and StackOverflow)
- `STACKAPPS_API_KEY`: (yml: `private.stackapps_api_key`)
Anonymous requests to the stackexchange API are limited to 300 calls per day.
To increase your quota to 10,000 calls per day, create an account at
[StackApps](https://stackapps.com/) and
[register an OAuth app](https://stackapps.com/apps/oauth/register). Having registered
an OAuth app, you'll be granted a key which can be used to increase your request quota.
It is not necessary to performa full OAuth Flow to gain an access token.
### TeamCity
- `TEAMCITY_ORIGINS` (yml: `public.services.teamcity.authorizedOrigins`)

12
doc/static-badges.md Normal file
View File

@@ -0,0 +1,12 @@
# Static Badges
It is possible to use shields.io to make a wide variety of badges displaying static text and/or logos. For example:
- ![any text you like](https://img.shields.io/badge/any%20text-you%20like-blue) - https://img.shields.io/badge/any%20text-you%20like-blue
- ![just the message](https://img.shields.io/badge/just%20the%20message-8A2BE2) - https://img.shields.io/badge/just%20the%20message-8A2BE2
- !['for the badge' style](https://img.shields.io/badge/%27for%20the%20badge%27%20style-20B2AA?style=for-the-badge) - https://img.shields.io/badge/%27for%20the%20badge%27%20style-20B2AA?style=for-the-badge
- ![with a logo](https://img.shields.io/badge/with%20a%20logo-grey?style=for-the-badge&logo=javascript) - https://img.shields.io/badge/with%20a%20logo-grey?style=for-the-badge&logo=javascript
Full documentation of styles and parameters: https://shields.io/#styles
More documentation on logos: https://github.com/badges/shields/blob/master/doc/logos.md

View File

@@ -6,7 +6,7 @@ import React, {
} from 'react'
import styled from 'styled-components'
import humanizeString from 'humanize-string'
import { stringify as stringifyQueryString } from 'query-string'
import qs from 'query-string'
import { advertisedStyles } from '../../lib/supported-features'
import { noAutocorrect, StyledInput } from '../common'
import {
@@ -94,7 +94,7 @@ function getQueryString({
}
})
const queryString = stringifyQueryString(outQuery)
const queryString = qs.stringify(outQuery)
return { queryString, isComplete }
}

View File

@@ -106,9 +106,6 @@ export default function SponsorsPage(): JSX.Element {
<li>
<a href="https://github.com/">GitHub</a>
</li>
<li>
<a href="https://lgtm.com/">LGTM</a>
</li>
<li>
<a href="https://uptimerobot.com/">Uptime Robot</a>
</li>

2928
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,22 +24,22 @@
"@fontsource/lato": "^4.5.10",
"@fontsource/lekton": "^4.5.11",
"@renovate/pep440": "^1.0.0",
"@renovatebot/ruby-semver": "^1.1.7",
"@sentry/node": "^7.21.1",
"@renovatebot/ruby-semver": "^1.1.8",
"@sentry/node": "^7.30.0",
"@shields_io/camp": "^18.1.1",
"badge-maker": "file:badge-maker",
"bytes": "^3.1.2",
"camelcase": "^7.0.0",
"chalk": "^5.1.2",
"camelcase": "^7.0.1",
"chalk": "^5.2.0",
"check-node-version": "^4.2.1",
"cloudflare-middleware": "^1.0.4",
"config": "^3.3.8",
"cross-env": "^7.0.3",
"dayjs": "^1.11.6",
"dayjs": "^1.11.7",
"decamelize": "^3.2.0",
"emojic": "^1.1.17",
"escape-string-regexp": "^4.0.0",
"fast-xml-parser": "^4.0.12",
"fast-xml-parser": "^4.0.13",
"glob": "^8.0.3",
"global-agent": "^3.0.0",
"got": "^12.5.3",
@@ -58,11 +58,11 @@
"path-to-regexp": "^6.2.1",
"pretty-bytes": "^6.0.0",
"priorityqueuejs": "^2.0.0",
"prom-client": "^14.1.0",
"prom-client": "^14.1.1",
"qs": "^6.11.0",
"query-string": "^7.1.1",
"query-string": "^8.1.0",
"semver": "~7.3.8",
"simple-icons": "7.20.0",
"simple-icons": "8.2.0",
"webextension-store-meta": "^1.0.5",
"xmldom": "~0.6.0",
"xpath": "~0.0.32"
@@ -142,7 +142,7 @@
]
},
"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/core": "^7.20.12",
"@babel/polyfill": "^7.12.1",
"@babel/register": "7.18.9",
"@istanbuljs/schema": "^0.1.3",
@@ -150,14 +150,14 @@
"@types/chai": "^4.3.4",
"@types/lodash.debounce": "^4.0.7",
"@types/lodash.groupby": "^4.6.7",
"@types/mocha": "^10.0.0",
"@types/mocha": "^10.0.1",
"@types/node": "^16.7.10",
"@types/react-helmet": "^6.1.5",
"@types/react-helmet": "^6.1.6",
"@types/react-modal": "^3.13.1",
"@types/react-select": "^4.0.17",
"@types/styled-components": "5.1.26",
"@typescript-eslint/eslint-plugin": "^5.44.0",
"@typescript-eslint/parser": "^5.42.0",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.46.0",
"babel-plugin-inline-react-svg": "^2.0.1",
"babel-preset-gatsby": "^2.22.0",
"c8": "^7.12.0",
@@ -169,57 +169,57 @@
"child-process-promise": "^2.2.1",
"clipboard-copy": "^4.0.1",
"concurrently": "^7.6.0",
"cypress": "^11.2.0",
"cypress": "^12.3.0",
"cypress-wait-for-stable-dom": "^0.1.0",
"danger": "^11.2.0",
"danger": "^11.2.1",
"danger-plugin-no-test-shortcuts": "^2.0.0",
"deepmerge": "^4.2.2",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-standard": "^16.0.3",
"eslint-config-standard-jsx": "^10.0.0",
"eslint-config-standard-react": "^11.0.1",
"eslint-plugin-chai-friendly": "^0.7.2",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.27.4",
"eslint-plugin-jsdoc": "^39.6.4",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-no-extension-in-require": "^0.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.2.0",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react": "^7.32.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sort-class-members": "^1.15.2",
"eslint-plugin-sort-class-members": "^1.16.0",
"fetch-ponyfill": "^7.1.0",
"form-data": "^4.0.0",
"gatsby": "4.23.1",
"gatsby-plugin-catch-links": "^4.19.0",
"gatsby-plugin-page-creator": "^4.24.0",
"gatsby-plugin-react-helmet": "^5.22.0",
"gatsby-plugin-catch-links": "^4.25.0",
"gatsby-plugin-page-creator": "^4.25.0",
"gatsby-plugin-react-helmet": "^5.25.0",
"gatsby-plugin-remove-trailing-slashes": "^4.9.0",
"gatsby-plugin-styled-components": "^5.24.0",
"gatsby-plugin-typescript": "^4.22.0",
"gatsby-plugin-typescript": "^4.25.0",
"humanize-string": "^2.1.0",
"icedfrisby": "4.0.0",
"icedfrisby-nock": "^2.1.0",
"is-svg": "^4.3.2",
"js-yaml-loader": "^1.2.2",
"jsdoc": "^4.0.0",
"lint-staged": "^13.0.4",
"lint-staged": "^13.1.0",
"lodash.debounce": "^4.0.8",
"lodash.difference": "^4.5.0",
"minimist": "^1.2.7",
"mocha": "^10.1.0",
"mocha": "^10.2.0",
"mocha-env-reporter": "^4.0.0",
"mocha-junit-reporter": "^2.2.0",
"mocha-yaml-loader": "^1.0.3",
"nock": "13.2.9",
"nock": "13.3.0",
"node-mocks-http": "^1.12.1",
"nodemon": "^2.0.20",
"npm-run-all": "^4.1.5",
"open-cli": "^7.1.0",
"portfinder": "^1.0.32",
"prettier": "2.8.0",
"prettier": "2.8.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-error-overlay": "^6.0.11",
@@ -229,17 +229,17 @@
"react-select": "^4.3.1",
"read-all-stdin-sync": "^1.0.5",
"redis-server": "^1.2.2",
"rimraf": "^3.0.2",
"rimraf": "^4.0.4",
"sazerac": "^2.0.0",
"simple-git-hooks": "^2.8.1",
"sinon": "^14.0.2",
"sinon": "^15.0.1",
"sinon-chai": "^3.7.0",
"snap-shot-it": "^7.9.6",
"start-server-and-test": "1.14.0",
"snap-shot-it": "^7.9.10",
"start-server-and-test": "1.15.2",
"styled-components": "^5.3.6",
"ts-mocha": "^10.0.0",
"tsd": "^0.24.1",
"typescript": "^4.9.3",
"tsd": "^0.25.0",
"typescript": "^4.9.4",
"url": "^0.11.0"
},
"engines": {

View File

@@ -0,0 +1,19 @@
import fs from 'fs/promises'
import got from 'got'
import yaml from 'js-yaml'
const resp = await got('https://api.github.com/versions').json()
const latestDate = resp.sort()[resp.length - 1]
const config = yaml.load(await fs.readFile('./config/default.yml', 'utf8'))
if (latestDate === config.public.services.github.restApiVersion) {
console.log("We're already using the latest version. No change needed.")
process.exit(0)
}
config.public.services.github.restApiVersion = latestDate
await fs.writeFile(
'./config/default.yml',
yaml.dump(config, { forceQuotes: true })
)

View File

@@ -1,117 +1,33 @@
import Joi from 'joi'
import { renderLicenseBadge } from '../licenses.js'
import { renderVersionBadge } from '../version.js'
import { renderDownloadsBadge } from '../downloads.js'
import { nonNegativeInteger } from '../validators.js'
import { BaseJsonService, InvalidResponse } from '../index.js'
import { deprecatedService } from '../index.js'
const keywords = ['atom']
const schema = Joi.object({
downloads: nonNegativeInteger,
releases: Joi.object({
latest: Joi.string().required(),
}),
metadata: Joi.object({
license: Joi.string().required(),
}),
const APMDownloads = deprecatedService({
category: 'downloads',
route: {
base: 'apm/dm',
pattern: ':various*',
},
label: 'downloads',
dateAdded: new Date('2023-01-04'),
})
class BaseAPMService extends BaseJsonService {
static defaultBadgeData = { label: 'apm' }
const APMVersion = deprecatedService({
category: 'version',
route: {
base: 'apm/v',
pattern: ':various*',
},
label: 'apm',
dateAdded: new Date('2023-01-04'),
})
async fetch({ packageName }) {
return this._requestJson({
schema,
url: `https://atom.io/api/packages/${packageName}`,
errorMessages: { 404: 'package not found' },
})
}
}
class APMDownloads extends BaseAPMService {
static category = 'downloads'
static route = { base: 'apm/dm', pattern: ':packageName' }
static examples = [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ downloads: '60043' }),
keywords,
},
]
static defaultBadgeData = { label: 'downloads' }
static render({ downloads }) {
return renderDownloadsBadge({ downloads, colorOverride: 'green' })
}
async handle({ packageName }) {
const json = await this.fetch({ packageName })
return this.constructor.render({ downloads: json.downloads })
}
}
class APMVersion extends BaseAPMService {
static category = 'version'
static route = { base: 'apm/v', pattern: ':packageName' }
static examples = [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ version: '0.6.0' }),
keywords,
},
]
static render({ version }) {
return renderVersionBadge({ version })
}
async handle({ packageName }) {
const json = await this.fetch({ packageName })
const version = json.releases.latest
if (!version)
throw new InvalidResponse({
underlyingError: new Error('version is invalid'),
})
return this.constructor.render({ version })
}
}
class APMLicense extends BaseAPMService {
static category = 'license'
static route = { base: 'apm/l', pattern: ':packageName' }
static examples = [
{
title: 'APM',
namedParams: { packageName: 'vim-mode' },
staticPreview: this.render({ license: 'MIT' }),
keywords,
},
]
static defaultBadgeData = { label: 'license' }
static render({ license }) {
return renderLicenseBadge({ license })
}
async handle({ packageName }) {
const json = await this.fetch({ packageName })
const license = json.metadata.license
if (!license)
throw new InvalidResponse({
underlyingError: new Error('licence is invalid'),
})
return this.constructor.render({ license })
}
}
const APMLicense = deprecatedService({
category: 'license',
route: {
base: 'apm/l',
pattern: ':various*',
},
label: 'license',
dateAdded: new Date('2023-01-04'),
})
export { APMDownloads, APMVersion, APMLicense }

View File

@@ -1,57 +1,19 @@
import { ServiceTester } from '../tester.js'
import { invalidJSON } from '../response-fixtures.js'
import { isMetric, isVPlusTripleDottedVersion } from '../test-validators.js'
export const t = new ServiceTester({
id: 'apm',
title: 'Atom Package Manager',
pathPrefix: '/apm',
})
t.create('Downloads')
.get('/dm/vim-mode.json')
.expectBadge({ label: 'downloads', message: isMetric })
.expectBadge({ label: 'downloads', message: 'no longer available' })
t.create('Version')
.get('/v/vim-mode.json')
.expectBadge({ label: 'apm', message: isVPlusTripleDottedVersion })
.expectBadge({ label: 'apm', message: 'no longer available' })
t.create('License')
.get('/l/vim-mode.json')
.expectBadge({ label: 'license', message: 'MIT' })
t.create('Downloads | Package not found')
.get('/dm/notapackage.json')
.expectBadge({ label: 'downloads', message: 'package not found' })
t.create('Version | Package not found')
.get('/v/notapackage.json')
.expectBadge({ label: 'apm', message: 'package not found' })
t.create('License | Package not found')
.get('/l/notapackage.json')
.expectBadge({ label: 'license', message: 'package not found' })
t.create('Invalid version')
.get('/dm/vim-mode.json')
.intercept(nock =>
nock('https://atom.io')
.get('/api/packages/vim-mode')
.reply(200, '{"releases":{}}')
)
.expectBadge({ label: 'downloads', message: 'invalid response data' })
t.create('Invalid License')
.get('/l/vim-mode.json')
.intercept(nock =>
nock('https://atom.io')
.get('/api/packages/vim-mode')
.reply(200, '{"metadata":{}}')
)
.expectBadge({ label: 'license', message: 'invalid response data' })
t.create('Unexpected response')
.get('/dm/vim-mode.json')
.intercept(nock =>
nock('https://atom.io').get('/api/packages/vim-mode').reply(invalidJSON)
)
.expectBadge({ label: 'downloads', message: 'unparseable json response' })
.expectBadge({ label: 'license', message: 'no longer available' })

View File

@@ -0,0 +1,100 @@
import Joi from 'joi'
import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
import { BaseSvgScrapingService } from '../index.js'
import { documentation } from './github-helpers.js'
const schema = Joi.object({
message: Joi.alternatives()
.try(isBuildStatus, Joi.equal('no status'))
.required(),
}).required()
const queryParamSchema = Joi.object({
event: Joi.string(),
branch: Joi.alternatives().try(Joi.string(), Joi.number().cast('string')),
}).required()
const keywords = ['action', 'actions']
export default class GithubActionsWorkflowStatus extends BaseSvgScrapingService {
static category = 'build'
static route = {
base: 'github/actions/workflow/status',
pattern: ':user/:repo/:workflow+',
queryParamSchema,
}
static examples = [
{
title: 'GitHub Workflow Status',
namedParams: {
user: 'actions',
repo: 'toolkit',
workflow: 'unit-tests.yml',
},
staticPreview: renderBuildStatusBadge({
status: 'passing',
}),
documentation,
keywords,
},
{
title: 'GitHub Workflow Status (with branch)',
namedParams: {
user: 'actions',
repo: 'toolkit',
workflow: 'unit-tests.yml',
},
queryParams: {
branch: 'main',
},
staticPreview: renderBuildStatusBadge({
status: 'passing',
}),
documentation,
keywords,
},
{
title: 'GitHub Workflow Status (with event)',
namedParams: {
user: 'actions',
repo: 'toolkit',
workflow: 'unit-tests.yml',
},
queryParams: {
event: 'push',
},
staticPreview: renderBuildStatusBadge({
status: 'passing',
}),
documentation,
keywords,
},
]
static defaultBadgeData = {
label: 'build',
}
async fetch({ user, repo, workflow, branch, event }) {
const { message: status } = await this._requestSvg({
schema,
url: `https://github.com/${user}/${repo}/actions/workflows/${encodeURIComponent(
workflow
)}/badge.svg`,
options: { searchParams: { branch, event } },
valueMatcher: />([^<>]+)<\/tspan><\/text><\/g><path/,
errorMessages: {
404: 'repo or workflow not found',
},
})
return { status }
}
async handle({ user, repo, workflow }, { branch, event }) {
const { status } = await this.fetch({ user, repo, workflow, branch, event })
return renderBuildStatusBadge({ status })
}
}

View File

@@ -0,0 +1,66 @@
import Joi from 'joi'
import { isBuildStatus } from '../build-status.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
const isWorkflowStatus = Joi.alternatives()
.try(isBuildStatus, Joi.equal('no status'))
.required()
t.create('nonexistent repo')
.get('/badges/shields-fakeness/fake.yml.json')
.expectBadge({
label: 'build',
message: 'repo or workflow not found',
})
t.create('nonexistent workflow')
.get('/actions/toolkit/not-a-real-workflow.yml.json')
.expectBadge({
label: 'build',
message: 'repo or workflow not found',
})
t.create('nonexistent branch')
.get('/actions/toolkit/unit-tests.yml.json?branch=not-a-real-branch')
.expectBadge({
label: 'build',
message: 'no status',
})
t.create('nonexistent event')
.get('/actions/toolkit/unit-tests.yml.json?event=not-a-real-event')
.expectBadge({
label: 'build',
message: 'no status',
})
t.create('numeric branch name')
.get('/actions/toolkit/unit-tests.yml.json?branch=9999')
.expectBadge({
label: 'build',
// the key thing we're testing here is that this doesn't fail with
// "invalid query parameter: branch"
message: 'no status',
})
t.create('valid workflow')
.get('/actions/toolkit/unit-tests.yml.json')
.expectBadge({
label: 'build',
message: isWorkflowStatus,
})
t.create('valid workflow (with branch)')
.get('/actions/toolkit/unit-tests.yml.json?branch=main')
.expectBadge({
label: 'build',
message: isWorkflowStatus,
})
t.create('valid workflow (with event)')
.get('/actions/toolkit/unit-tests.yml.json?event=push')
.expectBadge({
label: 'build',
message: isWorkflowStatus,
})

View File

@@ -41,6 +41,7 @@ class GithubApiProvider {
onTokenInvalidated = tokenString => {},
globalToken,
reserveFraction = 0.25,
restApiVersion,
}) {
Object.assign(this, {
baseUrl,
@@ -55,6 +56,7 @@ class GithubApiProvider {
this.searchTokens = new TokenPool({ batchSize: 5 })
this.graphqlTokens = new TokenPool({ batchSize: 25 })
}
this.restApiVersion = restApiVersion
}
addToken(tokenString) {
@@ -175,6 +177,7 @@ class GithubApiProvider {
headers: {
'User-Agent': userAgent,
Authorization: `token ${tokenString}`,
'X-GitHub-Api-Version': this.restApiVersion,
...options.headers,
},
},

View File

@@ -41,6 +41,7 @@ describe('GithubAuthV3Service', function () {
)
const githubApiProvider = new GithubApiProvider({
baseUrl: 'https://github-api.example.com',
restApiVersion: '2022-11-28',
})
const mockToken = { update: sinon.mock(), invalidate: sinon.mock() }
sinon.stub(githubApiProvider.standardTokens, 'next').returns(mockToken)
@@ -57,6 +58,7 @@ describe('GithubAuthV3Service', function () {
'User-Agent': 'shields (self-hosted)/dev',
Accept: 'application/vnd.github.antiope-preview+json',
Authorization: 'token undefined',
'X-GitHub-Api-Version': '2022-11-28',
},
}
)

View File

@@ -33,10 +33,11 @@ class GithubConstellation {
}
this.apiProvider = new GithubApiProvider({
baseUrl: process.env.GITHUB_URL || 'https://api.github.com',
baseUrl: config.service.baseUri,
globalToken,
withPooling: !globalToken,
onTokenInvalidated: tokenString => this.onTokenInvalidated(tokenString),
restApiVersion: config.service.restApiVersion,
})
this.oauthHelper = this.constructor._createOauthHelper(config)

View File

@@ -66,9 +66,9 @@ class GithubPipenvLockedPythonVersion extends ConditionalGithubAuthV3Service {
namedParams: {
user: 'metabolize',
repo: 'rq-dashboard-on-heroku',
branch: 'master',
branch: 'main',
},
staticPreview: this.render({ version: '3.7', branch: 'master' }),
staticPreview: this.render({ version: '3.7', branch: 'main' }),
documentation,
keywords,
},
@@ -135,7 +135,7 @@ class GithubPipenvLockedDependencyVersion extends ConditionalGithubAuthV3Service
repo: 'rq-dashboard-on-heroku',
kind: 'dev',
packageName: 'black',
branch: 'master',
branch: 'main',
},
staticPreview: this.render({ dependency: 'black', version: '19.3b0' }),
documentation,

View File

@@ -47,7 +47,7 @@ t.create('Locked version of default dependency')
t.create('Locked version of default dependency (branch)')
.get(
'/locked/dependency-version/metabolize/rq-dashboard-on-heroku/rq-dashboard/master.json'
'/locked/dependency-version/metabolize/rq-dashboard-on-heroku/rq-dashboard/main.json'
)
.expectBadge({
label: 'rq-dashboard',
@@ -65,7 +65,7 @@ t.create('Locked version of dev dependency')
t.create('Locked version of dev dependency (branch)')
.get(
'/locked/dependency-version/metabolize/rq-dashboard-on-heroku/dev/black/master.json'
'/locked/dependency-version/metabolize/rq-dashboard-on-heroku/dev/black/main.json'
)
.expectBadge({
label: 'black',

View File

@@ -1,100 +1,28 @@
import Joi from 'joi'
import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
import { BaseSvgScrapingService } from '../index.js'
import { documentation } from './github-helpers.js'
import { BaseService } from '../index.js'
const schema = Joi.object({
message: Joi.alternatives()
.try(isBuildStatus, Joi.equal('no status'))
.required(),
}).required()
const queryParamSchema = Joi.object({
event: Joi.string(),
}).required()
const keywords = ['action', 'actions']
export default class GithubWorkflowStatus extends BaseSvgScrapingService {
export default class DeprecatedGithubWorkflowStatus extends BaseService {
static category = 'build'
static route = {
base: 'github/workflow/status',
pattern: ':user/:repo/:workflow/:branch*',
queryParamSchema,
pattern: ':various+',
}
static examples = [
{
title: 'GitHub Workflow Status',
pattern: ':user/:repo/:workflow',
namedParams: {
user: 'actions',
repo: 'toolkit',
workflow: 'toolkit-unit-tests',
},
staticPreview: renderBuildStatusBadge({
status: 'passing',
}),
documentation,
keywords,
},
{
title: 'GitHub Workflow Status (branch)',
pattern: ':user/:repo/:workflow/:branch',
namedParams: {
user: 'actions',
repo: 'toolkit',
workflow: 'toolkit-unit-tests',
branch: 'master',
},
staticPreview: renderBuildStatusBadge({
status: 'passing',
}),
documentation,
keywords,
},
{
title: 'GitHub Workflow Status (event)',
pattern: ':user/:repo/:workflow',
namedParams: {
user: 'actions',
repo: 'toolkit',
workflow: 'toolkit-unit-tests',
},
queryParams: {
event: 'push',
},
staticPreview: renderBuildStatusBadge({
status: 'passing',
}),
documentation,
keywords,
},
]
static examples = []
static defaultBadgeData = {
label: 'build',
}
static defaultBadgeData = { label: 'build' }
async fetch({ user, repo, workflow, branch, event }) {
const { message: status } = await this._requestSvg({
schema,
url: `https://github.com/${user}/${repo}/workflows/${encodeURIComponent(
workflow
)}/badge.svg`,
options: { searchParams: { branch, event } },
valueMatcher: />([^<>]+)<\/tspan><\/text><\/g><path/,
errorMessages: {
404: 'repo, branch, or workflow not found',
},
})
return { status }
}
async handle({ user, repo, workflow, branch }, { event }) {
const { status } = await this.fetch({ user, repo, workflow, branch, event })
return renderBuildStatusBadge({ status })
async handle() {
return {
label: 'build',
message: 'https://github.com/badges/shields/issues/8671',
/*
This is a 'special' deprecation because we are making a breaking change
We've implemented it as a custom class instead of a normal
deprecatedService so that we can include link.
*/
link: ['https://github.com/badges/shields/issues/8671'],
color: 'red',
}
}
}

View File

@@ -1,43 +1,42 @@
import Joi from 'joi'
import { isBuildStatus } from '../build-status.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
import { ServiceTester } from '../tester.js'
const isWorkflowStatus = Joi.alternatives()
.try(isBuildStatus, Joi.equal('no status'))
.required()
export const t = new ServiceTester({
id: 'GithubWorkflowStatus',
title: 'Github Workflow Status',
pathPrefix: '/github/workflow/status',
})
t.create('nonexistent repo')
t.create('no longer available (previously nonexistent repo)')
.get('/badges/shields-fakeness/fake.json')
.expectBadge({
label: 'build',
message: 'repo, branch, or workflow not found',
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('nonexistent workflow')
t.create('no longer available (previously nonexistent workflow)')
.get('/actions/toolkit/not-a-real-workflow.json')
.expectBadge({
label: 'build',
message: 'repo, branch, or workflow not found',
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('valid workflow')
t.create('no longer available (previously valid workflow)')
.get('/actions/toolkit/toolkit-unit-tests.json')
.expectBadge({
label: 'build',
message: isWorkflowStatus,
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('valid workflow (branch)')
t.create('no longer available (previously valid workflow - branch)')
.get('/actions/toolkit/toolkit-unit-tests/master.json')
.expectBadge({
label: 'build',
message: isWorkflowStatus,
message: 'https://github.com/badges/shields/issues/8671',
})
t.create('valid workflow (event)')
t.create('no longer available (previously valid workflow - event)')
.get('/actions/toolkit/toolkit-unit-tests.json?event=push')
.expectBadge({
label: 'build',
message: isWorkflowStatus,
message: 'https://github.com/badges/shields/issues/8671',
})

View File

@@ -1,45 +1,11 @@
import { metric } from '../text-formatters.js'
import LgtmBaseService from './lgtm-base.js'
import { deprecatedService } from '../index.js'
export default class LgtmAlerts extends LgtmBaseService {
static route = {
export default deprecatedService({
category: 'analysis',
route: {
base: 'lgtm/alerts',
pattern: this.pattern,
}
static examples = [
{
title: 'LGTM Alerts',
namedParams: {
host: 'github',
user: 'apache',
repo: 'cloudstack',
},
staticPreview: this.render({ alerts: 2488 }),
},
]
static defaultBadgeData = {
label: 'lgtm alerts',
}
static getColor({ alerts }) {
let color = 'yellow'
if (alerts === 0) {
color = 'brightgreen'
}
return color
}
static render({ alerts }) {
return {
message: metric(alerts),
color: this.getColor({ alerts }),
}
}
async handle({ host, user, repo }) {
const { alerts } = await this.fetch({ host, user, repo })
return this.constructor.render({ alerts })
}
}
pattern: ':various*',
},
label: 'lgtm alerts',
dateAdded: new Date('2023-01-03'),
})

View File

@@ -1,61 +1,11 @@
import Joi from 'joi'
import { createServiceTester } from '../tester.js'
import { data } from './lgtm-test-helpers.js'
export const t = await createServiceTester()
import { ServiceTester } from '../tester.js'
t.create('alerts: total alerts for a project')
export const t = new ServiceTester({
id: 'lgtmAlerts',
title: 'LgtmAlerts',
pathPrefix: '/lgtm/alerts',
})
t.create('Lgtm')
.get('/github/apache/cloudstack.json')
.expectBadge({
label: 'lgtm alerts',
message: Joi.string().regex(/^[0-9kM.]+$/),
})
t.create('alerts: missing project')
.get('/github/some-org/this-project-doesnt-exist.json')
.expectBadge({
label: 'lgtm alerts',
message: 'project not found',
})
t.create('alerts: no alerts')
.get('/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, { alerts: 0, languages: data.languages })
)
.expectBadge({ label: 'lgtm alerts', message: '0' })
t.create('alerts: single alert')
.get('/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, { alerts: 1, languages: data.languages })
)
.expectBadge({ label: 'lgtm alerts', message: '1' })
t.create('alerts: multiple alerts')
.get('/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, { alerts: 123, languages: data.languages })
)
.expectBadge({ label: 'lgtm alerts', message: '123' })
t.create('alerts: json missing alerts')
.get('/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, {})
)
.expectBadge({ label: 'lgtm alerts', message: 'invalid response data' })
t.create('alerts: total alerts for a project with a github mapped host')
.get('/github/apache/cloudstack.json')
.expectBadge({
label: 'lgtm alerts',
message: Joi.string().regex(/^[0-9kM.]+$/),
})
.expectBadge({ label: 'lgtm alerts', message: 'no longer available' })

View File

@@ -1,42 +0,0 @@
import Joi from 'joi'
import { BaseJsonService } from '../index.js'
const schema = Joi.object({
alerts: Joi.number().required(),
languages: Joi.array()
.items(
Joi.object({
lang: Joi.string().required(),
grade: Joi.string(),
})
)
.required(),
}).required()
const hostMappings = {
github: 'g',
bitbucket: 'b',
gitlab: 'gl',
}
export default class LgtmBaseService extends BaseJsonService {
static category = 'analysis'
static defaultBadgeData = { label: 'lgtm' }
static pattern = `:host(${Object.keys(hostMappings).join('|')})/:user/:repo`
async fetch({ host, user, repo }) {
const mappedHost = hostMappings[host]
const url = `https://lgtm.com/api/v0.1/project/${mappedHost}/${user}/${repo}/details`
return this._requestJson({
schema,
url,
errorMessages: {
404: 'project not found',
},
})
}
}

View File

@@ -1,88 +1,11 @@
import LgtmBaseService from './lgtm-base.js'
import { deprecatedService } from '../index.js'
export default class LgtmGrade extends LgtmBaseService {
static route = {
export default deprecatedService({
category: 'analysis',
route: {
base: 'lgtm/grade',
pattern: `:language/${this.pattern}`,
}
static examples = [
{
title: 'LGTM Grade',
namedParams: {
language: 'java',
host: 'github',
user: 'apache',
repo: 'cloudstack',
},
staticPreview: this.render({
language: 'java',
data: {
languages: [
{
lang: 'java',
grade: 'C',
},
],
},
}),
},
]
static getLabel({ language }) {
const languageLabel = (() => {
switch (language) {
case 'cpp':
return 'c/c++'
case 'csharp':
return 'c#'
// Javascript analysis on LGTM also includes TypeScript
case 'javascript':
return 'js/ts'
default:
return language
}
})()
return languageLabel
}
static getGradeAndColor({ language, data }) {
let grade = 'no language data'
let color = 'red'
for (const languageData of data.languages) {
if (languageData.lang === language && 'grade' in languageData) {
// Pretty label for the language
grade = languageData.grade
// Pick colour based on grade
if (languageData.grade === 'A+') {
color = 'brightgreen'
} else if (languageData.grade === 'A') {
color = 'green'
} else if (languageData.grade === 'B') {
color = 'yellowgreen'
} else if (languageData.grade === 'C') {
color = 'yellow'
} else if (languageData.grade === 'D') {
color = 'orange'
}
}
}
return { grade, color }
}
static render({ language, data }) {
const { grade, color } = this.getGradeAndColor({ language, data })
return {
label: `code quality: ${this.getLabel({ language })}`,
message: grade,
color,
}
}
async handle({ language, host, user, repo }) {
const data = await this.fetch({ host, user, repo })
return this.constructor.render({ language, data })
}
}
pattern: ':various*',
},
label: 'lgtm grade',
dateAdded: new Date('2023-01-03'),
})

View File

@@ -1,106 +1,11 @@
import Joi from 'joi'
import { createServiceTester } from '../tester.js'
import { data } from './lgtm-test-helpers.js'
export const t = await createServiceTester()
import { ServiceTester } from '../tester.js'
t.create('grade: missing project')
.get('/java/github/some-org/this-project-doesnt-exist.json')
.expectBadge({
label: 'lgtm',
message: 'project not found',
})
export const t = new ServiceTester({
id: 'lgtmGrade',
title: 'LgtmGrade',
pathPrefix: '/lgtm/grade',
})
t.create('grade: json missing languages')
.get('/java/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, {})
)
.expectBadge({ label: 'lgtm', message: 'invalid response data' })
t.create('grade: grade for a project (java)')
.get('/java/github/apache/cloudstack.json')
.expectBadge({
label: 'code quality: java',
message: Joi.string().regex(/^(?:A\+)|A|B|C|D|E$/),
})
t.create('grade: grade for missing language')
.get('/foo/github/apache/cloudstack.json')
.expectBadge({
label: 'code quality: foo',
message: 'no language data',
})
t.create('grade: grade for a project with a mapped host')
.get('/java/github/apache/cloudstack.json')
.expectBadge({
label: 'code quality: java',
message: Joi.string().regex(/^(?:A\+)|A|B|C|D|E$/),
})
// Test display of languages
t.create('grade: cpp')
.get('/cpp/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, data)
)
.expectBadge({ label: 'code quality: c/c++', message: 'A+' })
t.create('grade: javascript')
.get('/javascript/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, data)
)
.expectBadge({ label: 'code quality: js/ts', message: 'A' })
t.create('grade: java')
.get('/java/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, data)
)
.expectBadge({ label: 'code quality: java', message: 'B' })
t.create('grade: python')
.get('/python/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, data)
)
.expectBadge({ label: 'code quality: python', message: 'C' })
t.create('grade: csharp')
.get('/csharp/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, data)
)
.expectBadge({ label: 'code quality: c#', message: 'D' })
t.create('grade: other')
.get('/other/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, data)
)
.expectBadge({ label: 'code quality: other', message: 'E' })
t.create('grade: foo (no grade for valid language)')
.get('/foo/github/apache/cloudstack.json')
.intercept(nock =>
nock('https://lgtm.com')
.get('/api/v0.1/project/g/apache/cloudstack/details')
.reply(200, data)
)
.expectBadge({ label: 'code quality: foo', message: 'no language data' })
t.create('Lgtm')
.get('/github/apache/cloudstack.json')
.expectBadge({ label: 'lgtm grade', message: 'no longer available' })

View File

@@ -7,9 +7,9 @@ export const t = new ServiceTester({
})
t.create('alerts')
.get('/alerts/g/badges/shields.svg')
.expectRedirect('/lgtm/alerts/github/badges/shields.svg')
.get('/alerts/g/badges/shields.json')
.expectBadge({ label: 'lgtm alerts', message: 'no longer available' })
t.create('grade')
.get('/grade/java/g/apache/cloudstack.svg')
.expectRedirect('/lgtm/grade/java/github/apache/cloudstack.svg')
.get('/grade/java/g/apache/cloudstack.json')
.expectBadge({ label: 'lgtm grade', message: 'no longer available' })

View File

@@ -1,14 +0,0 @@
const data = {
alerts: 0,
languages: [
{ lang: 'cpp', grade: 'A+' },
{ lang: 'javascript', grade: 'A' },
{ lang: 'java', grade: 'B' },
{ lang: 'python', grade: 'C' },
{ lang: 'csharp', grade: 'D' },
{ lang: 'other', grade: 'E' },
{ lang: 'foo' },
],
}
export { data }

View File

@@ -11,6 +11,7 @@ const versionSchema = Joi.array()
.items(
Joi.object({
version_number: Joi.string().required(),
game_versions: Joi.array().items(Joi.string()).min(1).required(),
}).required()
)
.required()

View File

@@ -0,0 +1,34 @@
import { BaseModrinthService, documentation } from './modrinth-base.js'
export default class ModrinthGameVersions extends BaseModrinthService {
static category = 'platform-support'
static route = {
base: 'modrinth/game-versions',
pattern: ':projectId',
}
static examples = [
{
title: 'Modrinth Game Versions',
namedParams: { projectId: 'AANobbMI' },
staticPreview: this.render({ versions: ['1.19.2', '1.19.1', '1.19'] }),
documentation,
},
]
static defaultBadgeData = { label: 'game versions' }
static render({ versions }) {
return {
message: versions.join(' | '),
color: 'blue',
}
}
async handle({ projectId }) {
const { 0: latest } = await this.fetchVersions({ projectId })
const versions = latest.game_versions
return this.constructor.render({ versions })
}
}

View File

@@ -0,0 +1,15 @@
import { createServiceTester } from '../tester.js'
import { withRegex } from '../test-validators.js'
export const t = await createServiceTester()
t.create('Game Versions')
.get('/AANobbMI.json')
.expectBadge({
label: 'game versions',
message: withRegex(/\d+\.\d+(\.\d+)?( \| )?/),
})
t.create('Game Versions (not found)')
.get('/not-existing.json')
.expectBadge({ label: 'game versions', message: 'not found', color: 'red' })

View File

@@ -2,14 +2,23 @@
* Utilities relating to PHP version numbers. This compares version numbers
* using the algorithm followed by Composer (see
* https://getcomposer.org/doc/04-schema.md#version).
*
* @module
*/
import { fetch } from '../core/base-service/got.js'
import { getCachedResource } from '../core/base-service/resource-cache.js'
import { listCompare } from './version.js'
import { omitv } from './text-formatters.js'
// Return a negative value if v1 < v2,
// zero if v1 = v2, a positive value otherwise.
/**
* Return a negative value if v1 < v2,
* zero if v1 = v2, a positive value otherwise.
*
* @param {string} v1 - First version for comparison
* @param {string} v2 - Second version for comparison
* @returns {number} Comparison result (-1, 0 or 1)
*/
function asciiVersionCompare(v1, v2) {
if (v1 < v2) {
return -1
@@ -20,9 +29,14 @@ function asciiVersionCompare(v1, v2) {
}
}
// Take a version without the starting v.
// eg, '1.0.x-beta'
// Return { numbers: [1,0,something big], modifier: 2, modifierCount: 1 }
/**
* Take a version without the starting v.
* eg, '1.0.x-beta'
* Return { numbers: [1,0,something big], modifier: 2, modifierCount: 1 }
*
* @param {string} version - Version number string
* @returns {object} Object containing version details
*/
function numberedVersionData(version) {
// A version has a numbered part and a modifier part
// (eg, 1.0.0-patch, 2.0.x-dev).
@@ -96,7 +110,12 @@ function numberedVersionData(version) {
}
}
// Try to convert to a list of numbers.
/**
* Try to convert to a list of numbers.
*
* @param {string} s - Version number string
* @returns {number} Version number interger
*/
function toNum(s) {
let n = +s
if (Number.isNaN(n)) {
@@ -113,12 +132,15 @@ function numberedVersionData(version) {
}
}
// Return a negative value if v1 < v2,
// zero if v1 = v2,
// a positive value otherwise.
//
// See https://getcomposer.org/doc/04-schema.md#version
// and https://github.com/badges/shields/issues/319#issuecomment-74411045
/**
* Compares two versions and return an interger based on the result.
* See https://getcomposer.org/doc/04-schema.md#version
* and https://github.com/badges/shields/issues/319#issuecomment-74411045
*
* @param {string} v1 - First version
* @param {string} v2 - Second version
* @returns {number} Negative value if v1 < v2, zero if v1 = v2, else a positive value
*/
function compare(v1, v2) {
// Omit the starting `v`.
const rawv1 = omitv(v1)
@@ -154,6 +176,12 @@ function compare(v1, v2) {
return 0
}
/**
* Determines the latest version from a list of versions.
*
* @param {string[]} versions - List of versions
* @returns {string} Latest version
*/
function latest(versions) {
let latest = versions[0]
for (let i = 1; i < versions.length; i++) {
@@ -164,6 +192,12 @@ function latest(versions) {
return latest
}
/**
* Determines if a version is stable or not.
*
* @param {string} version - Version number
* @returns {boolean} true if version is stable, else false
*/
function isStable(version) {
const rawVersion = omitv(version)
let versionData
@@ -176,6 +210,12 @@ function isStable(version) {
return versionData.modifier === 3 || versionData.modifier === 4
}
/**
* Checks if a version is valid and returns the minor version.
*
* @param {string} version - Version number
* @returns {string} Minor version
*/
function minorVersion(version) {
const result = version.match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/)
@@ -186,6 +226,13 @@ function minorVersion(version) {
return `${result[1]}.${result[2] ? result[2] : '0'}`
}
/**
* Reduces the list of php versions that intersect with release versions to a version range (for eg. '5.4 - 7.1', '>= 5.5').
*
* @param {string[]} versions - List of php versions
* @param {string[]} phpReleases - List of php release versions
* @returns {string[]} Reduced Version Range (for eg. ['5.4 - 7.1'], ['>= 5.5'])
*/
function versionReduction(versions, phpReleases) {
if (!versions.length) {
return []
@@ -216,6 +263,13 @@ function versionReduction(versions, phpReleases) {
return versions
}
/**
* Fetches the PHP release versions from cache if exists, else fetch from the souce url and save in cache.
*
* @async
* @param {object} githubApiProvider - Github API provider
* @returns {Promise<*>} Promise that resolves to parsed response
*/
async function getPhpReleases(githubApiProvider) {
return getCachedResource({
url: '/repos/php/php-src/git/refs/tags',

View File

@@ -1,11 +1,28 @@
/**
* Common functions and utilities for tasks related to pipenv
*
* @module
*/
import Joi from 'joi'
import { InvalidParameter } from './index.js'
/**
* Joi schema for validating dependency.
*
* @type {Joi}
*/
const isDependency = Joi.object({
version: Joi.string(),
ref: Joi.string(),
}).required()
/**
* Joi schema for validating lock file object.
* Checks if the lock file object has required properties and the properties are valid.
*
* @type {Joi}
*/
const isLockfile = Joi.object({
_meta: Joi.object({
requires: Joi.object({
@@ -16,6 +33,18 @@ const isLockfile = Joi.object({
develop: Joi.object().pattern(Joi.string(), isDependency),
}).required()
/**
* Determines the dependency version based on the dependency type.
*
* @param {object} attrs - Refer to individual attributes
* @param {string} attrs.kind - Wanted dependency type ('dev' or 'default'), defaults to 'default'
* @param {string} attrs.wantedDependency - Name of the wanted dependency
* @param {object} attrs.lockfileData - Object containing lock file data
* @throws {Error} - Error if unknown dependency type provided
* @throws {InvalidParameter} - Error if wanted dependency is not present in lock file data
* @throws {InvalidParameter} - Error if version or ref is not present for the wanted dependency
* @returns {object} Object containing wanted dependency version or ref
*/
function getDependencyVersion({
kind = 'default',
wantedDependency,

View File

@@ -50,7 +50,17 @@ function getLicenses(packageData) {
const {
info: { license },
} = packageData
if (license) {
/*
The .license field may either contain
- a short license description (e.g: 'MIT' or 'GPL-3.0') or
- the full text of a license
but there is nothing in the response that tells us explicitly.
We have to make an assumption based on the length.
See https://github.com/badges/shields/issues/8689 and
https://github.com/badges/shields/pull/8690 for more info.
*/
if (license && license.length < 40) {
return [license]
} else {
const parenthesizedAcronymRegex = /\(([^)]+)\)/

View File

@@ -116,6 +116,13 @@ describe('PyPI helpers', function () {
classifiers: ['License :: OSI Approved :: MIT License'],
},
}),
given({
info: {
license:
'this text is really really really really really really long',
classifiers: ['License :: OSI Approved :: MIT License'],
},
}),
given({
info: {
license: '',

View File

@@ -0,0 +1,37 @@
import { BaseJsonService } from '../index.js'
import { metric } from '../text-formatters.js'
import { floorCount as floorCountColor } from '../color-formatters.js'
export function renderQuestionsBadge({
suffix,
stackexchangesite,
query,
numValue,
}) {
const label = `${stackexchangesite} ${query} questions`
return {
label,
message: `${metric(numValue)}${suffix}`,
color: floorCountColor(numValue, 1000, 10000, 20000),
}
}
export class StackExchangeBase extends BaseJsonService {
static category = 'chat'
static auth = {
passKey: 'stackapps_api_key',
authorizedOrigins: ['https://api.stackexchange.com'],
isRequired: false,
}
static defaultBadgeData = {
label: 'stackoverflow',
}
async fetch(params) {
return this._requestJson(
this.authHelper.withQueryStringAuth({ passKey: 'key' }, params)
)
}
}

View File

@@ -0,0 +1,38 @@
import Joi from 'joi'
import { expect } from 'chai'
import nock from 'nock'
import { cleanUpNockAfterEach, defaultContext } from '../test-helpers.js'
import { StackExchangeBase } from './stackexchange-base.js'
class DummyStackExchangeService extends StackExchangeBase {
static route = { base: 'fake-base' }
async handle() {
const data = await this.fetch({
schema: Joi.any(),
url: 'https://api.stackexchange.com/2.2/tags/python/info',
})
return { message: data.message }
}
}
describe('StackExchangeBase', function () {
describe('auth', function () {
cleanUpNockAfterEach()
const config = { private: { stackapps_api_key: 'fake-key' } }
it('sends the auth information as configured', async function () {
const scope = nock('https://api.stackexchange.com')
.get('/2.2/tags/python/info')
.query({ key: 'fake-key' })
.reply(200, { message: 'fake message' })
expect(
await DummyStackExchangeService.invoke(defaultContext, config, {})
).to.deep.equal({ message: 'fake message' })
scope.done()
})
})
})

View File

@@ -1,16 +0,0 @@
import { metric } from '../text-formatters.js'
import { floorCount as floorCountColor } from '../color-formatters.js'
export default function renderQuestionsBadge({
suffix,
stackexchangesite,
query,
numValue,
}) {
const label = `${stackexchangesite} ${query} questions`
return {
label,
message: `${metric(numValue)}${suffix}`,
color: floorCountColor(numValue, 1000, 10000, 20000),
}
}

View File

@@ -1,16 +1,16 @@
import dayjs from 'dayjs'
import Joi from 'joi'
import { nonNegativeInteger } from '../validators.js'
import { BaseJsonService } from '../index.js'
import renderQuestionsBadge from './stackexchange-helpers.js'
import {
renderQuestionsBadge,
StackExchangeBase,
} from './stackexchange-base.js'
const tagSchema = Joi.object({
total: nonNegativeInteger,
}).required()
export default class StackExchangeMonthlyQuestions extends BaseJsonService {
static category = 'chat'
export default class StackExchangeMonthlyQuestions extends StackExchangeBase {
static route = {
base: 'stackexchange',
pattern: ':stackexchangesite/qm/:query',
@@ -29,10 +29,6 @@ export default class StackExchangeMonthlyQuestions extends BaseJsonService {
},
]
static defaultBadgeData = {
label: 'stackoverflow',
}
static render(props) {
return renderQuestionsBadge({
suffix: '/month',
@@ -51,7 +47,7 @@ export default class StackExchangeMonthlyQuestions extends BaseJsonService {
.endOf('month')
.unix()
const parsedData = await this._requestJson({
const parsedData = await this.fetch({
schema: tagSchema,
options: {
decompress: true,

View File

@@ -1,7 +1,7 @@
import Joi from 'joi'
import { metric } from '../text-formatters.js'
import { floorCount as floorCountColor } from '../color-formatters.js'
import { BaseJsonService } from '../index.js'
import { StackExchangeBase } from './stackexchange-base.js'
const reputationSchema = Joi.object({
items: Joi.array()
@@ -14,9 +14,7 @@ const reputationSchema = Joi.object({
.required(),
}).required()
export default class StackExchangeReputation extends BaseJsonService {
static category = 'chat'
export default class StackExchangeReputation extends StackExchangeBase {
static route = {
base: 'stackexchange',
pattern: ':stackexchangesite/r/:query',
@@ -34,10 +32,6 @@ export default class StackExchangeReputation extends BaseJsonService {
},
]
static defaultBadgeData = {
label: 'stackoverflow',
}
static render({ stackexchangesite, numValue }) {
const label = `${stackexchangesite} reputation`
@@ -51,7 +45,7 @@ export default class StackExchangeReputation extends BaseJsonService {
async handle({ stackexchangesite, query }) {
const path = `users/${query}`
const parsedData = await this._requestJson({
const parsedData = await this.fetch({
schema: reputationSchema,
options: { decompress: true, searchParams: { site: stackexchangesite } },
url: `https://api.stackexchange.com/2.2/${path}`,

View File

@@ -1,6 +1,8 @@
import Joi from 'joi'
import { BaseJsonService } from '../index.js'
import renderQuestionsBadge from './stackexchange-helpers.js'
import {
renderQuestionsBadge,
StackExchangeBase,
} from './stackexchange-base.js'
const tagSchema = Joi.object({
items: Joi.array()
@@ -13,9 +15,7 @@ const tagSchema = Joi.object({
.required(),
}).required()
export default class StackExchangeQuestions extends BaseJsonService {
static category = 'chat'
export default class StackExchangeQuestions extends StackExchangeBase {
static route = {
base: 'stackexchange',
pattern: ':stackexchangesite/t/:query',
@@ -34,10 +34,6 @@ export default class StackExchangeQuestions extends BaseJsonService {
},
]
static defaultBadgeData = {
label: 'stackoverflow',
}
static render(props) {
return renderQuestionsBadge({
suffix: '',
@@ -48,7 +44,7 @@ export default class StackExchangeQuestions extends BaseJsonService {
async handle({ stackexchangesite, query }) {
const path = `tags/${query}/info`
const parsedData = await this._requestJson({
const parsedData = await this.fetch({
schema: tagSchema,
options: { decompress: true, searchParams: { site: stackexchangesite } },
url: `https://api.stackexchange.com/2.2/${path}`,

View File

@@ -0,0 +1,79 @@
import Joi from 'joi'
import { optionalUrl } from '../validators.js'
import { latest, renderVersionBadge } from '../version.js'
import { BaseJsonService, NotFound } from '../index.js'
const queryParamSchema = Joi.object({
repository_url: optionalUrl.required(),
include_prereleases: Joi.equal(''),
}).required()
const schema = Joi.object({
packages: Joi.object()
.pattern(
/./,
Joi.object({
versions: Joi.object().pattern(/./, Joi.object()).min(1).required(),
}).required()
)
.required(),
}).required()
export default class VpmVersion extends BaseJsonService {
static category = 'version'
static route = {
base: 'vpm/v',
pattern: ':packageId',
queryParamSchema,
}
static examples = [
{
title: 'VPM Package Version',
namedParams: {
packageId: 'com.vrchat.udonsharp',
},
queryParams: {
repository_url: 'https://packages.vrchat.com/curated?download',
},
staticPreview: renderVersionBadge({ version: '1.1.6' }),
},
{
title: 'VPM Package Version (including prereleases)',
namedParams: {
packageId: 'com.vrchat.udonsharp',
},
queryParams: {
repository_url: 'https://packages.vrchat.com/curated?download',
include_prereleases: null,
},
staticPreview: renderVersionBadge({ version: '1.1.6' }),
},
]
static defaultBadgeData = {
label: 'vpm',
}
async fetch({ repositoryUrl }) {
return this._requestJson({
schema,
url: repositoryUrl,
})
}
async handle(
{ packageId },
{ repository_url: repositoryUrl, include_prereleases: prereleases }
) {
const data = await this.fetch({ repositoryUrl })
const pkg = data.packages[packageId]
if (pkg === undefined)
throw new NotFound({ prettyMessage: 'package not found' })
const versions = Object.keys(pkg.versions)
const version = latest(versions, { pre: prereleases !== undefined })
return renderVersionBadge({ version })
}
}

View File

@@ -0,0 +1,51 @@
import { isSemver } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('gets the package version of com.vrchat.udonsharp')
.get(
'/com.vrchat.udonsharp.json?repository_url=https%3A%2F%2Fpackages.vrchat.com%2Fcurated%3Fdownload'
)
.expectBadge({ label: 'vpm', message: isSemver })
t.create('gets the latest version')
.intercept(nock =>
nock('https://packages.vrchat.com')
.get('/curated?download')
.reply(200, {
packages: {
'com.vrchat.udonsharp': {
versions: {
'2.0.0': {},
'2.1.0-rc1': {},
'1.9.0': {},
},
},
},
})
)
.get(
'/com.vrchat.udonsharp.json?repository_url=https%3A%2F%2Fpackages.vrchat.com%2Fcurated%3Fdownload'
)
.expectBadge({ label: 'vpm', message: 'v2.0.0' })
t.create('gets the latest version including prerelease')
.intercept(nock =>
nock('https://packages.vrchat.com')
.get('/curated?download')
.reply(200, {
packages: {
'com.vrchat.udonsharp': {
versions: {
'2.0.0': {},
'2.1.0-rc1': {},
'1.9.0': {},
},
},
},
})
)
.get(
'/com.vrchat.udonsharp.json?repository_url=https%3A%2F%2Fpackages.vrchat.com%2Fcurated%3Fdownload&include_prereleases'
)
.expectBadge({ label: 'vpm', message: 'v2.1.0-rc1' })