Compare commits

...

68 Commits

Author SHA1 Message Date
chris48s
c3786e2bf0 use PAT if available else fall back to workflow token 2022-10-16 18:22:52 +01:00
chris48s
f0ad7b6b75 skip workflows on push to dependabot branch 2022-10-16 17:04:09 +01:00
chris48s
80ab79e589 constrain auto-close and enforce-dependency-review triggers
we don't need to run these on PR close or when we apply labels, for example
2022-10-16 17:03:12 +01:00
dependabot[bot]
523e31d389 chore(deps-dev): bump minimist from 1.2.6 to 1.2.7 (#8528)
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  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>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-10-16 10:38:36 +01:00
dependabot[bot]
73142977e4 chore(deps): bump chalk from 5.1.0 to 5.1.2 (#8533)
Bumps [chalk](https://github.com/chalk/chalk) from 5.1.0 to 5.1.2.
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](https://github.com/chalk/chalk/compare/v5.1.0...v5.1.2)

---
updated-dependencies:
- dependency-name: chalk
  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>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-10-16 09:34:05 +00:00
dependabot[bot]
46a241c7d3 chore(deps): bump got from 12.5.1 to 12.5.2 (#8534)
Bumps [got](https://github.com/sindresorhus/got) from 12.5.1 to 12.5.2.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v12.5.1...v12.5.2)

---
updated-dependencies:
- dependency-name: got
  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>
2022-10-16 09:34:23 +01:00
dependabot[bot]
6925946bc1 chore(deps-dev): bump eslint-plugin-react from 7.31.8 to 7.31.10 (#8530)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.31.8 to 7.31.10.
- [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.8...v7.31.10)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  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-10-15 21:48:23 +00:00
dependabot[bot]
8a3b2dbbc0 chore(deps): bump simple-icons from 7.14.0 to 7.15.0 (#8529)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 7.14.0 to 7.15.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/7.14.0...7.15.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-10-15 22:42:34 +01:00
dependabot[bot]
0db492d188 chore(deps): bump @sentry/node from 7.14.2 to 7.15.0 (#8526)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.14.2 to 7.15.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.14.2...7.15.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-10-15 22:30:41 +01:00
dependabot[bot]
c21116ca85 chore(deps): bump joi from 17.6.2 to 17.6.3 (#8532)
Bumps [joi](https://github.com/hapijs/joi) from 17.6.2 to 17.6.3.
- [Release notes](https://github.com/hapijs/joi/releases)
- [Commits](https://github.com/hapijs/joi/compare/v17.6.2...v17.6.3)

---
updated-dependencies:
- dependency-name: joi
  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>
2022-10-15 20:45:00 +00:00
dependabot[bot]
523f9de33e chore(deps-dev): bump @typescript-eslint/eslint-plugin (#8522)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.39.0 to 5.40.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.40.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-10-15 20:37:08 +00:00
dependabot[bot]
781bde7750 chore(deps-dev): bump cypress from 10.9.0 to 10.10.0 (#8524)
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.9.0 to 10.10.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/v10.9.0...v10.10.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-10-15 19:50:02 +00:00
Martin Costello
bd6a04ba03 fix: Support WAITING status for GitHub deployments (#8521)
Fix "invalid response data" badge label for GitHub deployments pending approval.
2022-10-15 20:29:38 +01:00
chris48s
cab87aa19d update [bitbucket] private repo test (#8520)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-12 21:51:29 +00:00
chris48s
65a921da24 update [powershellgallery] platform example (#8518)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-12 21:43:52 +00:00
chris48s
7c562900ed fix [myget] downloads (tenant) test (#8513)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-12 00:11:17 +00:00
Paula Barszcz
a96c25a405 [Whatpulse] badge for a user and for a team (#8466)
* skeleton of WhatPulse badge is done

* rename to category; add UptimeShort; switch to lowercase

* Add divergence for user and team

* small rename; cases for tests listed but not yet coded

* add ordinal numbers to whatpulse ranks

* modify error service tests for whatpulse

* WhatPulse badge changes are in progress

* update tests for WhatPulse badge:

* in tests, rename category to metric

* rename stats to metric

* some polishing

* add daysjs-duration-humanize to uptimeseconds

* add more + increase specificity of whatpulse service tests

* update example

* add space for upload and download

* Update services/test-validators.js
2022-10-11 19:46:42 +00:00
chris48s
21881d6b9c increase timeout for [reuse] not found test (#8519) 2022-10-10 20:59:46 -05:00
chris48s
fd49e60410 update [JenkinsPluginInstalls] test example (#8511)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-10 18:18:44 +00:00
chris48s
f43675109b migrate integration tests to GH actions (#8423)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-10 18:09:14 +00:00
chris48s
125d815a1b deprecate [pkgreview] service (#8499)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-10 17:18:30 +00:00
github-actions[bot]
ac26caf798 Changelog for Release server-2022-10-08 (#8507)
* Update Changelog

Co-authored-by: release[bot] <actions@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-10-08 20:16:23 +01:00
chris48s
952076024d deprecate [criterion] service (#8501)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-08 18:43:15 +00:00
chris48s
c7c6fa7d81 fix [wordpress] php version not set test (#8496)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-08 10:50:45 +00:00
chris48s
8f4662bd0b fix formatRelativeDate error handling; run [date] (#8497)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-08 10:43:29 +00:00
chris48s
d78a2f4155 allow/validate bitbucket_username / bitbucket_password in private config schema (#8472)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-08 10:37:05 +00:00
chris48s
96a93a6146 fix [pub] points badge test and example (#8498)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-08 10:29:59 +00:00
dependabot[bot]
00fe8b4921 chore(deps): bump @fontsource/lato from 4.5.9 to 4.5.10 (#8482)
Bumps [@fontsource/lato](https://github.com/fontsource/fontsource/tree/HEAD/fonts/google/lato) from 4.5.9 to 4.5.10.
- [Release notes](https://github.com/fontsource/fontsource/releases)
- [Changelog](https://github.com/fontsource/fontsource/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fontsource/fontsource/commits/HEAD/fonts/google/lato)

---
updated-dependencies:
- dependency-name: "@fontsource/lato"
  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-10-08 02:35:32 +00:00
dependabot[bot]
d8865fddae chore(deps): bump semver from 7.3.7 to 7.3.8 (#8494)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.7 to 7.3.8.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.3.7...v7.3.8)

---
updated-dependencies:
- dependency-name: 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>
2022-10-08 02:25:07 +00:00
guoxudong
05ab8a0bd7 feat: add [GitlabLanguageCount] service (#8377)
* feat: add gitlab language count service

* fix testr

* fix

Signed-off-by: guoxudong <guoxd@jihulab.com>

Signed-off-by: guoxudong <guoxd@jihulab.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-07 20:49:07 -05:00
dependabot[bot]
e1f44a29f7 chore(deps): bump json-schema and jsprim (#8504)
Bumps [json-schema](https://github.com/kriszyp/json-schema) and [jsprim](https://github.com/joyent/node-jsprim). These dependencies needed to be updated together.

Updates `json-schema` from 0.2.3 to 0.4.0
- [Release notes](https://github.com/kriszyp/json-schema/releases)
- [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.3...v0.4.0)

Updates `jsprim` from 1.4.1 to 1.4.2
- [Release notes](https://github.com/joyent/node-jsprim/releases)
- [Changelog](https://github.com/TritonDataCenter/node-jsprim/blob/v1.4.2/CHANGES.md)
- [Commits](https://github.com/joyent/node-jsprim/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: json-schema
  dependency-type: indirect
- dependency-name: jsprim
  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-10-07 21:29:20 +00:00
dependabot[bot]
a36e12d323 chore(deps-dev): bump open-cli from 7.0.1 to 7.1.0 (#8487)
Bumps [open-cli](https://github.com/sindresorhus/open-cli) from 7.0.1 to 7.1.0.
- [Release notes](https://github.com/sindresorhus/open-cli/releases)
- [Commits](https://github.com/sindresorhus/open-cli/compare/v7.0.1...v7.1.0)

---
updated-dependencies:
- dependency-name: open-cli
  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-10-07 21:21:02 +00:00
dependabot[bot]
43a51d8423 chore(deps): bump engine.io and socket.io (#8503)
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 4.1.1 to 4.1.2
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/4.1.2/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/4.1.1...4.1.2)

Updates `socket.io` from 2.4.1 to 2.5.0
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/2.5.0/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/2.4.1...2.5.0)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  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-10-07 21:14:42 +00:00
dependabot[bot]
98c8437947 chore(deps): bump socket.io-parser from 3.4.0 to 3.4.1 (#8502)
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/3.4.0...3.4.1)

---
updated-dependencies:
- dependency-name: socket.io-parser
  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-10-07 21:02:09 +00:00
dependabot[bot]
fa2045253a chore(deps): bump fast-xml-parser from 4.0.10 to 4.0.11 (#8485)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.0.10 to 4.0.11.
- [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.10...v4.0.11)

---
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>
2022-10-07 20:40:42 +00:00
dependabot[bot]
1c3aa2a691 chore(deps-dev): bump danger from 11.1.2 to 11.1.4 (#8489)
Bumps [danger](https://github.com/danger/danger-js) from 11.1.2 to 11.1.4.
- [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.1.2...11.1.4)

---
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>
2022-10-07 20:34:49 +00:00
dependabot[bot]
be9d59ca3f chore(deps-dev): bump @typescript-eslint/eslint-plugin (#8484)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.37.0 to 5.39.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.39.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-10-07 20:29:02 +00:00
dependabot[bot]
89f0571ae1 chore(deps): bump @fontsource/lekton from 4.5.10 to 4.5.11 (#8491)
Bumps [@fontsource/lekton](https://github.com/fontsource/fontsource/tree/HEAD/fonts/google/lekton) from 4.5.10 to 4.5.11.
- [Release notes](https://github.com/fontsource/fontsource/releases)
- [Changelog](https://github.com/fontsource/fontsource/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fontsource/fontsource/commits/HEAD/fonts/google/lekton)

---
updated-dependencies:
- dependency-name: "@fontsource/lekton"
  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>
2022-10-07 20:20:14 +00:00
dependabot[bot]
f42af970f7 chore(deps-dev): bump sinon from 14.0.0 to 14.0.1 (#8488)
Bumps [sinon](https://github.com/sinonjs/sinon) from 14.0.0 to 14.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/v14.0.0...v14.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-10-07 20:14:28 +00:00
dependabot[bot]
2511984378 chore(deps): bump simple-icons from 7.13.0 to 7.14.0 (#8492)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 7.13.0 to 7.14.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/7.13.0...7.14.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-10-07 20:05:05 +00:00
dependabot[bot]
32626b012c chore(deps): bump chalk from 5.0.1 to 5.1.0 (#8493)
Bumps [chalk](https://github.com/chalk/chalk) from 5.0.1 to 5.1.0.
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](https://github.com/chalk/chalk/compare/v5.0.1...v5.1.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-10-07 19:59:17 +00:00
dependabot[bot]
bfd1c8d099 chore(deps): bump @sentry/node from 7.14.0 to 7.14.2 (#8495)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.14.0 to 7.14.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.14.0...7.14.2)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  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>
2022-10-07 19:50:33 +00:00
Seth Falco
2c6390a663 docs: update wording and url for freecodecamp usernames (#8480)
* docs: update wording and url for freecodecamp usernames

* docs: fix typo in CONTRIBUTING.md

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-10-07 19:43:43 +00:00
dependabot[bot]
f2b0b81a47 chore(deps-dev): bump cypress-wait-for-stable-dom from 0.0.3 to 0.0.4 (#8483)
Bumps [cypress-wait-for-stable-dom](https://github.com/narinluangrath/cypress-wait-for-stable-dom) from 0.0.3 to 0.0.4.
- [Release notes](https://github.com/narinluangrath/cypress-wait-for-stable-dom/releases)
- [Commits](https://github.com/narinluangrath/cypress-wait-for-stable-dom/commits)

---
updated-dependencies:
- dependency-name: cypress-wait-for-stable-dom
  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-10-07 20:31:48 +01:00
Tejas Dhamecha
78b5a6bf46 [GitHubGistStars] add GitHub Gist Stars (#8471)
* add schema and fetch method to service class

* add transform, render and handle method to service class

* add documentation and examples

* add tester

* add suggeseted changes

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-04 18:48:26 +00:00
chris48s
cf6be05221 fix display/search of CII badge examples (#8473)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-03 20:14:03 +00:00
dependabot[bot]
17288eaee2 chore(deps): bump @actions/github in /.github/actions/close-bot (#8474)
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.3 to 5.1.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  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-10-03 18:43:10 +01:00
dependabot[bot]
2ddb44b429 chore(deps-dev): bump styled-components from 5.3.5 to 5.3.6 (#8446)
Bumps [styled-components](https://github.com/styled-components/styled-components) from 5.3.5 to 5.3.6.
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Changelog](https://github.com/styled-components/styled-components/blob/main/CHANGELOG.md)
- [Commits](https://github.com/styled-components/styled-components/compare/v5.3.5...v5.3.6)

---
updated-dependencies:
- dependency-name: styled-components
  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-10-03 17:06:20 +00:00
dependabot[bot]
53d1e291cc chore(deps-dev): bump gatsby-plugin-styled-components (#8451)
Bumps [gatsby-plugin-styled-components](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-styled-components) from 5.19.0 to 5.24.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-styled-components/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-styled-components@5.24.0/packages/gatsby-plugin-styled-components)

---
updated-dependencies:
- dependency-name: gatsby-plugin-styled-components
  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-10-03 17:00:03 +00:00
dependabot[bot]
cef88fa2bc chore(deps): bump got from 12.5.0 to 12.5.1 (#8459)
Bumps [got](https://github.com/sindresorhus/got) from 12.5.0 to 12.5.1.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v12.5.0...v12.5.1)

---
updated-dependencies:
- dependency-name: got
  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>
2022-10-03 16:51:45 +00:00
dependabot[bot]
53fddfe8e6 chore(deps): bump joi from 17.6.1 to 17.6.2 (#8456)
Bumps [joi](https://github.com/hapijs/joi) from 17.6.1 to 17.6.2.
- [Release notes](https://github.com/hapijs/joi/releases)
- [Commits](https://github.com/hapijs/joi/compare/v17.6.1...v17.6.2)

---
updated-dependencies:
- dependency-name: joi
  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>
2022-10-03 14:56:18 +00:00
dependabot[bot]
eee59c8be5 chore(deps): bump @sentry/node from 7.13.0 to 7.14.0 (#8461)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 7.13.0 to 7.14.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.13.0...7.14.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-10-03 14:49:35 +00:00
dependabot[bot]
fab8f74cd6 chore(deps-dev): bump mocha-junit-reporter from 2.0.2 to 2.1.0 (#8462)
Bumps [mocha-junit-reporter](https://github.com/michaelleeallen/mocha-junit-reporter) from 2.0.2 to 2.1.0.
- [Release notes](https://github.com/michaelleeallen/mocha-junit-reporter/releases)
- [Commits](https://github.com/michaelleeallen/mocha-junit-reporter/compare/v2.0.2...v2.1.0)

---
updated-dependencies:
- dependency-name: mocha-junit-reporter
  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-10-03 14:43:38 +00:00
dependabot[bot]
8e1680d65d chore(deps-dev): bump typescript from 4.8.3 to 4.8.4 (#8455)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.8.3 to 4.8.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.8.3...v4.8.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-10-03 14:35:34 +00:00
dependabot[bot]
ea8a5623ed chore(deps-dev): bump cypress from 10.8.0 to 10.9.0 (#8457)
Bumps [cypress](https://github.com/cypress-io/cypress) from 10.8.0 to 10.9.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/v10.8.0...v10.9.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-10-03 14:29:44 +00:00
dependabot[bot]
67f451eae1 chore(deps-dev): bump gatsby-plugin-page-creator from 4.23.1 to 4.24.0 (#8464)
Bumps [gatsby-plugin-page-creator](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/gatsby-plugin-page-creator) from 4.23.1 to 4.24.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.24.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-10-03 14:22:49 +00:00
dependabot[bot]
804e12282e chore(deps-dev): bump @babel/core from 7.19.1 to 7.19.3 (#8460)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.19.1 to 7.19.3.
- [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.19.3/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-10-03 14:14:03 +00:00
dependabot[bot]
ed8e8a396e chore(deps): bump simple-icons from 7.12.0 to 7.13.0 (#8463)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 7.12.0 to 7.13.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/7.12.0...7.13.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-10-03 14:06:10 +00:00
dependabot[bot]
ea08fb160c chore(deps): bump @actions/core in /.github/actions/close-bot (#8449)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  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-10-03 14:00:01 +00:00
Tejas Dhamecha
882b8c92e3 feat: add 2022 support to GitHub Hacktoberfest (#8468) 2022-10-02 09:01:33 -05:00
Paula Barszcz
2260126064 [GitLabCoverage] subgroup bug (#8401) 2022-09-28 21:08:45 +01:00
chris48s
2599427069 implement ruby gems-specific version sort/color functions (#8434)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-09-27 19:37:51 +00:00
chris48s
7330da1038 Add rc to pre-release identifiers (#8435)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-09-26 18:49:26 +00:00
dependabot[bot]
5b6b29db02 chore(deps): bump simple-icons from 7.11.0 to 7.12.0 (#8432)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 7.11.0 to 7.12.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/7.11.0...7.12.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-09-24 19:39:35 +00:00
dependabot[bot]
bb35f57e41 chore(deps): bump joi from 17.6.0 to 17.6.1 (#8431)
Bumps [joi](https://github.com/hapijs/joi) from 17.6.0 to 17.6.1.
- [Release notes](https://github.com/hapijs/joi/releases)
- [Commits](https://github.com/hapijs/joi/compare/v17.6.0...v17.6.1)

---
updated-dependencies:
- dependency-name: joi
  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>
2022-09-24 19:33:54 +00:00
dependabot[bot]
a51fa4d31b chore(deps): bump got from 12.4.1 to 12.5.0 (#8429)
Bumps [got](https://github.com/sindresorhus/got) from 12.4.1 to 12.5.0.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v12.4.1...v12.5.0)

---
updated-dependencies:
- dependency-name: got
  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-09-24 19:28:22 +00:00
dependabot[bot]
a976562262 chore(deps): bump ansi-html and @gatsbyjs/webpack-hot-middleware (#8436)
Removes [ansi-html](https://github.com/Tjatse/ansi-html). It's no longer used after updating ancestor dependency [@gatsbyjs/webpack-hot-middleware](https://github.com/gatsbyjs/webpack-hot-middleware). These dependencies need to be updated together.


Removes `ansi-html`

Updates `@gatsbyjs/webpack-hot-middleware` from 2.25.2 to 2.25.3
- [Release notes](https://github.com/gatsbyjs/webpack-hot-middleware/releases)
- [Commits](https://github.com/gatsbyjs/webpack-hot-middleware/commits)

---
updated-dependencies:
- dependency-name: ansi-html
  dependency-type: indirect
- dependency-name: "@gatsbyjs/webpack-hot-middleware"
  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>
2022-09-24 19:21:46 +00:00
dependabot[bot]
076b384f84 chore(deps-dev): bump gatsby from 4.23.0 to 4.23.1 (#8430)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 4.23.0 to 4.23.1.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@4.23.0...gatsby@4.23.1)

---
updated-dependencies:
- dependency-name: gatsby
  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-09-24 19:02:10 +00:00
55 changed files with 2853 additions and 2196 deletions

View File

@@ -1,27 +1,5 @@
version: 2
integration_steps: &integration_steps
steps:
- checkout
- run:
name: Install dependencies
command: |
npm ci
environment:
CYPRESS_INSTALL_BINARY: 0
- run:
name: Integration tests
when: always
environment:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/integration/results.xml
command: npm run test:integration
- store_test_results:
path: junit
services_steps: &services_steps
steps:
- checkout
@@ -48,22 +26,6 @@ services_steps: &services_steps
path: junit
jobs:
integration:
docker:
- image: cimg/node:16.15
- image: redis
<<: *integration_steps
integration@node-17:
docker:
- image: cimg/node:17.9
- image: redis
environment:
NPM_CONFIG_ENGINE_STRICT: 'false'
<<: *integration_steps
danger:
docker:
- image: cimg/node:16.15
@@ -185,10 +147,6 @@ workflows:
on-commit:
jobs:
- integration@node-17:
filters:
branches:
ignore: gh-pages
- frontend:
filters:
branches:

View File

@@ -9,23 +9,23 @@
"version": "0.0.0",
"license": "CC0",
"dependencies": {
"@actions/core": "^1.9.1",
"@actions/github": "^5.0.3"
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1"
}
},
"node_modules/@actions/core": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
"integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"node_modules/@actions/github": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.3.tgz",
"integrity": "sha512-myjA/pdLQfhUGLtRZC/J4L1RXOG4o6aYdiEq+zr5wVVKljzbFld+xv10k1FX6IkIJtNxbAq44BdwSNpQ015P0A==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
@@ -235,18 +235,18 @@
},
"dependencies": {
"@actions/core": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
"integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"requires": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"@actions/github": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.3.tgz",
"integrity": "sha512-myjA/pdLQfhUGLtRZC/J4L1RXOG4o6aYdiEq+zr5wVVKljzbFld+xv10k1FX6IkIJtNxbAq44BdwSNpQ015P0A==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
"requires": {
"@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",

View File

@@ -10,7 +10,7 @@
"author": "chris48s",
"license": "CC0",
"dependencies": {
"@actions/core": "^1.9.1",
"@actions/github": "^5.0.3"
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1"
}
}

View File

@@ -0,0 +1,20 @@
name: 'Integration tests'
description: 'Run integration tests'
inputs:
github-token:
description: 'The GITHUB_TOKEN secret'
required: true
runs:
using: 'composite'
steps:
- name: Integration Tests
if: always()
run: npm run test:integration -- --reporter json --reporter-option 'output=reports/integration-tests.json'
env:
GH_TOKEN: '${{ inputs.github-token }}'
shell: bash
- name: Write Markdown Summary
if: always()
run: node scripts/mocha2md.js Integration reports/integration-tests.json >> $GITHUB_STEP_SUMMARY
shell: bash

View File

@@ -1,5 +1,7 @@
name: Auto close
on: pull_request_target
on:
pull_request_target:
types: [opened]
permissions:
pull-requests: write

View File

@@ -1,5 +1,7 @@
name: 'Dependency Review'
on: [pull_request]
on:
pull_request:
types: [opened, edited, reopened, synchronize]
jobs:
enforce-dependency-review:

View File

@@ -0,0 +1,47 @@
name: Integration@node 17
on:
pull_request:
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-integration-17:
runs-on: ubuntu-latest
env:
PAT_EXISTS: ${{ secrets.GH_PAT != '' }}
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 17
env:
NPM_CONFIG_ENGINE_STRICT: 'false'
- name: Integration Tests (with PAT)
if: ${{ env.PAT_EXISTS == 'true' }}
uses: ./.github/actions/integration-tests
with:
github-token: '${{ secrets.GH_PAT }}'
- name: Integration Tests (with workflow token)
if: ${{ env.PAT_EXISTS == 'false' }}
uses: ./.github/actions/integration-tests
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'

45
.github/workflows/test-integration.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: Integration
on:
pull_request:
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-integration:
runs-on: ubuntu-latest
env:
PAT_EXISTS: ${{ secrets.GH_PAT != '' }}
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 16
- name: Integration Tests (with PAT)
if: ${{ env.PAT_EXISTS == 'true' }}
uses: ./.github/actions/integration-tests
with:
github-token: '${{ secrets.GH_PAT }}'
- name: Integration Tests (with workflow token)
if: ${{ env.PAT_EXISTS == 'false' }}
uses: ./.github/actions/integration-tests
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'

View File

@@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-lint:

View File

@@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-main-17:

View File

@@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-main:

View File

@@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
# Smoke test (render a badge with the CLI) with only the package
# dependencies installed.

View File

@@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-package-lib:

View File

@@ -4,6 +4,24 @@ Note: this changelog is for the shields.io server. The changelog for the badge-m
---
## server-2022-10-08
- deprecate [criterion] service [#8501](https://github.com/badges/shields/issues/8501)
- fix formatRelativeDate error handling; run [date] [#8497](https://github.com/badges/shields/issues/8497)
- allow/validate bitbucket_username / bitbucket_password in private config schema [#8472](https://github.com/badges/shields/issues/8472)
- fix [pub] points badge test and example [#8498](https://github.com/badges/shields/issues/8498)
- feat: add [GitlabLanguageCount] service [#8377](https://github.com/badges/shields/issues/8377)
- [GitHubGistStars] add GitHub Gist Stars [#8471](https://github.com/badges/shields/issues/8471)
- fix display/search of CII badge examples [#8473](https://github.com/badges/shields/issues/8473)
- feat: add 2022 support to GitHub Hacktoberfest [#8468](https://github.com/badges/shields/issues/8468)
- fix [GitLabCoverage] subgroup bug [#8401](https://github.com/badges/shields/issues/8401)
- implement ruby gems-specific version sort/color functions [#8434](https://github.com/badges/shields/issues/8434)
- Add `rc` to pre-release identifiers [#8435](https://github.com/badges/shields/issues/8435)
- add [GitHub] Number of commits between branches/tags/commits [#8394](https://github.com/badges/shields/issues/8394)
- add [Packagist] dependency version [#8371](https://github.com/badges/shields/issues/8371)
- fix Docker build status invalid response data bug [#8392](https://github.com/badges/shields/issues/8392)
- Dependency updates
## server-2022-09-04
- fix frontend compile for users running on Windows [#8350](https://github.com/badges/shields/issues/8350)

View File

@@ -134,7 +134,7 @@ Prettier before a commit by default.
When adding or changing a service [please write tests][service-tests], and ensure the [title of your Pull Requests follows the required conventions](#running-service-tests-in-pull-requests) to ensure your tests are executed.
When changing other code, please add unit tests.
To run the integration tests, you must have redis installed and in your PATH.
To run the integration tests, you must have Redis installed and in your PATH.
Use `brew install redis`, `yum install redis`, etc. The test runner will
start the server automatically.

View File

@@ -169,6 +169,8 @@ const privateConfigSchema = Joi.object({
jenkins_pass: Joi.string(),
jira_user: Joi.string(),
jira_pass: Joi.string(),
bitbucket_username: Joi.string(),
bitbucket_password: Joi.string(),
bitbucket_server_username: Joi.string(),
bitbucket_server_password: Joi.string(),
librariesio_tokens: Joi.arrayFromString().items(Joi.string()),

3913
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -21,15 +21,16 @@
"url": "https://github.com/badges/shields"
},
"dependencies": {
"@fontsource/lato": "^4.5.9",
"@fontsource/lekton": "^4.5.10",
"@fontsource/lato": "^4.5.10",
"@fontsource/lekton": "^4.5.11",
"@renovate/pep440": "^1.0.0",
"@sentry/node": "^7.13.0",
"@renovatebot/ruby-semver": "^1.1.6",
"@sentry/node": "^7.15.0",
"@shields_io/camp": "^18.1.1",
"badge-maker": "file:badge-maker",
"bytes": "^3.1.2",
"camelcase": "^7.0.0",
"chalk": "^5.0.1",
"chalk": "^5.1.2",
"check-node-version": "^4.2.1",
"cloudflare-middleware": "^1.0.4",
"config": "^3.3.8",
@@ -38,14 +39,14 @@
"decamelize": "^3.2.0",
"emojic": "^1.1.17",
"escape-string-regexp": "^4.0.0",
"fast-xml-parser": "^4.0.10",
"fast-xml-parser": "^4.0.11",
"glob": "^8.0.3",
"global-agent": "^3.0.0",
"got": "^12.4.1",
"got": "^12.5.2",
"graphql": "^15.6.1",
"graphql-tag": "^2.12.6",
"ioredis": "5.2.3",
"joi": "17.6.0",
"joi": "17.6.3",
"joi-extension-semver": "5.0.0",
"js-yaml": "^4.1.0",
"jsonpath": "~1.1.1",
@@ -60,8 +61,8 @@
"prom-client": "^14.1.0",
"qs": "^6.11.0",
"query-string": "^7.1.1",
"semver": "~7.3.7",
"simple-icons": "7.11.0",
"semver": "~7.3.8",
"simple-icons": "7.15.0",
"webextension-store-meta": "^1.0.5",
"xmldom": "~0.6.0",
"xpath": "~0.0.32"
@@ -141,7 +142,7 @@
]
},
"devDependencies": {
"@babel/core": "^7.19.1",
"@babel/core": "^7.19.3",
"@babel/polyfill": "^7.12.1",
"@babel/register": "7.18.9",
"@istanbuljs/schema": "^0.1.3",
@@ -155,7 +156,7 @@
"@types/react-modal": "^3.13.1",
"@types/react-select": "^4.0.17",
"@types/styled-components": "5.1.26",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.30.7",
"babel-plugin-inline-react-svg": "^2.0.1",
"babel-preset-gatsby": "^2.22.0",
@@ -168,9 +169,9 @@
"child-process-promise": "^2.2.1",
"clipboard-copy": "^4.0.1",
"concurrently": "^7.4.0",
"cypress": "^10.8.0",
"cypress-wait-for-stable-dom": "^0.0.3",
"danger": "^11.1.2",
"cypress": "^10.10.0",
"cypress-wait-for-stable-dom": "^0.0.4",
"danger": "^11.1.4",
"danger-plugin-no-test-shortcuts": "^2.0.0",
"deepmerge": "^4.2.2",
"eslint": "^7.32.0",
@@ -186,17 +187,17 @@
"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.8",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sort-class-members": "^1.15.2",
"fetch-ponyfill": "^7.1.0",
"form-data": "^4.0.0",
"gatsby": "4.23.0",
"gatsby": "4.23.1",
"gatsby-plugin-catch-links": "^4.19.0",
"gatsby-plugin-page-creator": "^4.22.0",
"gatsby-plugin-page-creator": "^4.24.0",
"gatsby-plugin-react-helmet": "^5.22.0",
"gatsby-plugin-remove-trailing-slashes": "^4.9.0",
"gatsby-plugin-styled-components": "^5.19.0",
"gatsby-plugin-styled-components": "^5.24.0",
"gatsby-plugin-typescript": "^4.22.0",
"humanize-string": "^2.1.0",
"icedfrisby": "4.0.0",
@@ -207,16 +208,16 @@
"lint-staged": "^13.0.3",
"lodash.debounce": "^4.0.8",
"lodash.difference": "^4.5.0",
"minimist": "^1.2.6",
"minimist": "^1.2.7",
"mocha": "^9.2.2",
"mocha-env-reporter": "^4.0.0",
"mocha-junit-reporter": "^2.0.2",
"mocha-junit-reporter": "^2.1.0",
"mocha-yaml-loader": "^1.0.3",
"nock": "13.2.9",
"node-mocks-http": "^1.11.0",
"nodemon": "^2.0.20",
"npm-run-all": "^4.1.5",
"open-cli": "^7.0.1",
"open-cli": "^7.1.0",
"portfinder": "^1.0.32",
"prettier": "2.7.1",
"react": "^17.0.2",
@@ -231,14 +232,14 @@
"rimraf": "^3.0.2",
"sazerac": "^2.0.0",
"simple-git-hooks": "^2.8.0",
"sinon": "^14.0.0",
"sinon": "^14.0.1",
"sinon-chai": "^3.7.0",
"snap-shot-it": "^7.9.6",
"start-server-and-test": "1.14.0",
"styled-components": "^5.3.5",
"styled-components": "^5.3.6",
"ts-mocha": "^10.0.0",
"tsd": "^0.24.1",
"typescript": "^4.8.3",
"typescript": "^4.8.4",
"url": "^0.11.0"
},
"engines": {

View File

@@ -20,7 +20,7 @@ t.create('pr-raw (not found)')
t.create('pr-raw (private repo)')
.get('/pr-raw/chris48s/example-private-repo.json')
.expectBadge({ label: 'pull requests', message: 'private repo' })
.expectBadge({ label: 'pull requests', message: 'not found' })
t.create('pr (valid)').get('/pr/atlassian/python-bitbucket.json').expectBadge({
label: 'pull requests',
@@ -33,7 +33,7 @@ t.create('pr (not found)')
t.create('pr (private repo)')
.get('/pr/chris48s/example-private-repo.json')
.expectBadge({ label: 'pull requests', message: 'private repo' })
.expectBadge({ label: 'pull requests', message: 'not found' })
t.create('pr (server)')
.get('/pr/project/repo.json?server=https://bitbucket.mydomain.net')

View File

@@ -35,7 +35,7 @@ export default class CIIBestPracticesService extends BaseJsonService {
pattern: ':metric(level|percentage|summary)/:projectId',
}
static exampless = [
static examples = [
{
title: 'CII Best Practices Level',
pattern: 'level/:projectId',

View File

@@ -23,7 +23,7 @@ function version(version) {
if (first === 'v') {
first = version[1]
}
if (first === '0' || /alpha|beta|snapshot|dev|pre/i.test(version)) {
if (first === '0' || /alpha|beta|snapshot|dev|pre|rc/i.test(version)) {
return 'orange'
} else {
return 'blue'

View File

@@ -88,6 +88,7 @@ describe('Color formatters', function () {
given('6.0-SNAPSHOT'),
given('1.0.1-dev'),
given('2.1.6-prerelease'),
given('2.1.6-RC1'),
]).expect('orange')
expect(() => version(null)).to.throw(

View File

@@ -1,66 +1,11 @@
import Joi from 'joi'
import { BaseJsonService } from '../index.js'
import {
IMPROVED_STATUS,
NOT_FOUND_STATUS,
REGRESSED_STATUS,
NO_CHANGE_STATUS,
} from './constants.js'
import { deprecatedService } from '../index.js'
const schema = Joi.string()
.allow(IMPROVED_STATUS, REGRESSED_STATUS, NO_CHANGE_STATUS)
.required()
/**
* Criterion Badge Service
*
* Support and Contact:
* - https://github.com/chmoder/api.criterion.dev
*
* API Documentation:
* - https://app.swaggerhub.com/apis-docs/chmoder/Criterion.dev
*/
export default class Criterion extends BaseJsonService {
static category = 'analysis'
static route = { base: 'criterion', pattern: ':user/:repo' }
static examples = [
{
title: 'Criterion',
namedParams: {
user: 'chmoder',
repo: 'data_vault',
},
staticPreview: this.render({ status: IMPROVED_STATUS }),
},
]
static defaultBadgeData = { label: 'criterion' }
static render({ status }) {
let statusColor = 'lightgrey'
if (status === IMPROVED_STATUS) {
statusColor = 'brightgreen'
} else if (status === NO_CHANGE_STATUS) {
statusColor = 'green'
} else if (statusColor === REGRESSED_STATUS) {
statusColor = 'red'
}
return {
message: `${status}`,
color: statusColor,
}
}
async handle({ user, repo }) {
const status = await this._requestJson({
url: `https://api.criterion.dev/v1/${user}/${repo}/status`,
errorMessages: { 404: NOT_FOUND_STATUS },
schema,
})
return this.constructor.render({ status })
}
}
export default deprecatedService({
category: 'analysis',
route: {
base: 'criterion',
pattern: ':various*',
},
label: 'criterion',
dateAdded: new Date('2022-10-07'),
})

View File

@@ -1,21 +1,11 @@
import Joi from 'joi'
import { createServiceTester } from '../tester.js'
import {
IMPROVED_STATUS,
REGRESSED_STATUS,
NO_CHANGE_STATUS,
NOT_FOUND_STATUS,
} from './constants.js'
export const t = await createServiceTester()
import { ServiceTester } from '../tester.js'
const isStatus = Joi.string()
.allow(IMPROVED_STATUS, REGRESSED_STATUS, NOT_FOUND_STATUS, NO_CHANGE_STATUS)
.required()
export const t = new ServiceTester({
id: 'criterion',
title: 'Criterion',
pathPrefix: '/criterion',
})
t.create('Criterion (valid repo)')
t.create('Criterion')
.get('/chmoder/credit_card.json')
.expectBadge({ label: 'criterion', message: isStatus })
t.create('Criterion (not found)')
.get('/chmoder/not-a-repo.json')
.expectBadge({ label: 'criterion', message: NOT_FOUND_STATUS })
.expectBadge({ label: 'criterion', message: 'no longer available' })

View File

@@ -4,9 +4,10 @@ import { BaseJsonService, InvalidResponse, NotFound } from '../index.js'
/**
* Validates that the schema response is what we're expecting.
* The username pattern should match the freeCodeCamp repository.
* The username pattern should match the requirements in the freeCodeCamp
* repository.
*
* @see https://github.com/freeCodeCamp/freeCodeCamp/blob/main/utils/validate.js#L14
* @see https://github.com/freeCodeCamp/freeCodeCamp/blob/main/utils/validate.js
*/
const schema = Joi.object({
entities: Joi.object({

View File

@@ -0,0 +1,25 @@
import { valid, maxSatisfying, prerelease } from '@renovatebot/ruby-semver'
function latest(versions) {
// latest Ruby Gems version, including pre-releases
return maxSatisfying(versions, '>0')
}
function versionColor(version) {
if (!valid(version)) {
return 'lightgrey'
}
version = `${version}`
let first = version[0]
if (first === 'v') {
first = version[1]
}
if (first === '0' || prerelease(version)) {
return 'orange'
}
return 'blue'
}
export { latest, versionColor }

View File

@@ -0,0 +1,17 @@
import { test, given } from 'sazerac'
import { latest, versionColor } from './gem-helpers.js'
describe('Gem helpers', function () {
test(latest, () => {
given(['2.0.0', '2.0.0.beta1']).expect('2.0.0')
given(['2.0.0.beta1', '1.9.0']).expect('2.0.0.beta1')
given(['0.0.1', '0.0.2']).expect('0.0.2')
})
test(versionColor, () => {
given('1.9.0').expect('blue')
given('2.0.0.beta1').expect('orange')
given('0.0.1').expect('orange')
given('v1').expect('lightgrey')
})
})

View File

@@ -1,12 +1,7 @@
import Joi from 'joi'
import { createServiceTester } from '../tester.js'
import { isOrdinalNumber, isOrdinalNumberDaily } from '../test-validators.js'
export const t = await createServiceTester()
const isOrdinalNumber = Joi.string().regex(/^[1-9][0-9]+(ᵗʰ|ˢᵗ|ⁿᵈ|ʳᵈ)$/)
const isOrdinalNumberDaily = Joi.string().regex(
/^[1-9][0-9]*(ᵗʰ|ˢᵗ|ⁿᵈ|ʳᵈ) daily$/
)
t.create('total rank (valid)').get('/rt/rspec-puppet-facts.json').expectBadge({
label: 'rank',
message: isOrdinalNumber,

View File

@@ -1,6 +1,7 @@
import Joi from 'joi'
import { renderVersionBadge, latest } from '../version.js'
import { renderVersionBadge } from '../version.js'
import { BaseJsonService } from '../index.js'
import { latest, versionColor } from './gem-helpers.js'
const schema = Joi.object({
// In most cases `version` will be a SemVer but the registry doesn't
@@ -45,7 +46,7 @@ export default class GemVersion extends BaseJsonService {
static defaultBadgeData = { label: 'gem' }
static render({ version }) {
return renderVersionBadge({ version })
return renderVersionBadge({ version, versionFormatter: versionColor })
}
async fetch({ gem }) {

View File

@@ -7,7 +7,7 @@ import { documentation, transformErrors } from './github-helpers.js'
const greenStates = ['SUCCESS']
const redStates = ['ERROR', 'FAILURE']
const blueStates = ['INACTIVE']
const otherStates = ['IN_PROGRESS', 'QUEUED', 'PENDING', 'NO_STATUS']
const otherStates = ['IN_PROGRESS', 'QUEUED', 'PENDING', 'NO_STATUS', 'WAITING']
const stateToMessageMappings = {
IN_PROGRESS: 'in progress',

View File

@@ -21,6 +21,12 @@ describe('GithubDeployments', function () {
message: 'in progress',
color: undefined,
})
given({
state: 'WAITING',
}).expect({
message: 'waiting',
color: undefined,
})
given({
state: 'NO_STATUS',
}).expect({

View File

@@ -0,0 +1,113 @@
import gql from 'graphql-tag'
import Joi from 'joi'
import { metric } from '../text-formatters.js'
import { NotFound } from '../index.js'
import { GithubAuthV4Service } from './github-auth-service.js'
import { documentation as commonDocumentation } from './github-helpers.js'
const schema = Joi.object({
data: Joi.object({
viewer: Joi.object({
gist: Joi.object({
stargazerCount: Joi.number().required(),
url: Joi.string().required(),
owner: Joi.object({
login: Joi.string().required(),
}).required(),
name: Joi.string().required(),
}).allow(null),
}).required(),
}).required(),
}).required()
const documentation = `${commonDocumentation}
<p>This badge shows the number of stargazers for a gist. Gist id is accepted as input and 'gist not found' is returned if the gist is not found for the given gist id.
</p>`
export default class GithubGistStars extends GithubAuthV4Service {
static category = 'social'
static route = {
base: 'github/stars/gists',
pattern: ':gistId',
}
static examples = [
{
title: 'Github Gist stars',
namedParams: { gistId: '47a4d00457a92aa426dbd48a18776322' },
staticPreview: {
label: this.defaultBadgeData.label,
message: metric(29),
style: 'social',
},
documentation,
},
]
static defaultBadgeData = {
label: 'Stars',
color: 'blue',
namedLogo: 'github',
}
static render({ stargazerCount, url, stargazers }) {
return { message: metric(stargazerCount), link: [url, stargazers] }
}
async fetch({ gistId }) {
const data = await this._requestGraphql({
query: gql`
query ($gistId: String!) {
viewer {
gist(name: $gistId) {
stargazerCount
url
name
owner {
login
}
}
}
}
`,
variables: {
gistId,
},
schema,
})
return data
}
static transform({ data }) {
const {
data: {
viewer: { gist },
},
} = data
if (!gist) {
throw new NotFound({ prettyMessage: 'gist not found' })
}
const {
stargazerCount,
url,
name,
owner: { login },
} = gist
const stargazers = `https://gist.github.com/${login}/${name}/stargazers`
return { stargazerCount, url, stargazers }
}
async handle({ gistId }) {
const data = await this.fetch({ gistId })
const { stargazerCount, url, stargazers } =
await this.constructor.transform({
data,
})
return this.constructor.render({ stargazerCount, url, stargazers })
}
}

View File

@@ -0,0 +1,25 @@
import { createServiceTester } from '../tester.js'
import { isMetric } from '../test-validators.js'
export const t = await createServiceTester()
t.create('Gist Total Stars')
.get('/47a4d00457a92aa426dbd48a18776322.json')
.expectBadge({
label: 'Stars',
message: isMetric,
color: 'blue',
link: [
'https://gist.github.com/47a4d00457a92aa426dbd48a18776322',
'https://gist.github.com/maratori/47a4d00457a92aa426dbd48a18776322/stargazers',
],
})
t.create('Gist Total Stars (Not Found)')
.get('/invalid-gist-id.json')
.expectBadge({
label: 'Stars',
message: 'gist not found',
color: 'red',
link: [],
})

View File

@@ -60,7 +60,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
static category = 'issue-tracking'
static route = {
base: 'github/hacktoberfest',
pattern: ':year(2019|2020|2021)/:user/:repo',
pattern: ':year(2019|2020|2021|2022)/:user/:repo',
queryParamSchema,
}
@@ -68,7 +68,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
{
title: 'GitHub Hacktoberfest combined status',
namedParams: {
year: '2021',
year: '2022',
user: 'snyk',
repo: 'snyk',
},
@@ -82,7 +82,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
{
title: 'GitHub Hacktoberfest combined status (suggestion label override)',
namedParams: {
year: '2021',
year: '2022',
user: 'tmrowco',
repo: 'tmrowapp-contrib',
},
@@ -90,7 +90,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
suggestion_label: 'help wanted',
},
staticPreview: this.render({
year: '2021',
year: '2022',
suggestedIssueCount: 12,
contributionCount: 8,
daysLeft: 15,

View File

@@ -0,0 +1,13 @@
import { redirector } from '../index.js'
export default redirector({
category: 'coverage',
route: {
base: 'gitlab/coverage',
pattern: ':user/:repo/:branch',
},
transformPath: ({ user, repo }) =>
`/gitlab/pipeline-coverage/${user}/${repo}`,
transformQueryParams: ({ branch }) => ({ branch }),
dateAdded: new Date('2022-09-25'),
})

View File

@@ -0,0 +1,22 @@
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Coverage redirect (with branch)')
.get('/gitlab-org/gitlab-runner/master.json')
.expectRedirect(
'/gitlab/pipeline-coverage/gitlab-org/gitlab-runner.json?branch=master'
)
t.create('Coverage redirect (with branch and job_name)')
.get('/gitlab-org/gitlab-runner/master.json?job_name=test coverage report')
.expectRedirect(
'/gitlab/pipeline-coverage/gitlab-org/gitlab-runner.json?branch=master&job_name=test%20coverage%20report'
)
t.create('Coverage redirect (with branch and gitlab_url)')
.get(
'/gitlab-org/gitlab-runner/master.json?gitlab_url=https://gitlab.gnome.org'
)
.expectRedirect(
'/gitlab/pipeline-coverage/gitlab-org/gitlab-runner.json?branch=master&gitlab_url=https%3a%2f%2fgitlab.gnome.org'
)

View File

@@ -0,0 +1,68 @@
import Joi from 'joi'
import { optionalUrl } from '../validators.js'
import { metric } from '../text-formatters.js'
import { documentation, errorMessagesFor } from './gitlab-helper.js'
import GitLabBase from './gitlab-base.js'
/*
We're expecting a response like { "Ruby": 67.13, "JavaScript": 19.66 }
The keys could be anything and {} is a valid response (e.g: for an empty project)
*/
const schema = Joi.object().pattern(/./, Joi.number().min(0).max(100))
const queryParamSchema = Joi.object({
gitlab_url: optionalUrl,
}).required()
export default class GitlabLanguageCount extends GitLabBase {
static category = 'analysis'
static route = {
base: 'gitlab/languages/count',
pattern: ':project+',
queryParamSchema,
}
static examples = [
{
title: 'GitLab language count',
namedParams: {
project: 'gitlab-org/gitlab',
},
queryParams: { gitlab_url: 'https://gitlab.com' },
staticPreview: {
label: 'languages',
message: '5',
},
documentation,
},
]
static defaultBadgeData = { label: 'languages' }
static render({ languagesCount }) {
return {
message: metric(languagesCount),
color: 'blue',
}
}
async fetch({ project, baseUrl }) {
// https://docs.gitlab.com/ee/api/projects.html#languages
return super.fetch({
schema,
url: `${baseUrl}/api/v4/projects/${encodeURIComponent(
project
)}/languages`,
errorMessages: errorMessagesFor('project not found'),
})
}
async handle({ project }, { gitlab_url: baseUrl = 'https://gitlab.com' }) {
const data = await this.fetch({
project,
baseUrl,
})
return this.constructor.render({ languagesCount: Object.keys(data).length })
}
}

View File

@@ -0,0 +1,25 @@
import { isMetric } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('language count').get('/gitlab-org/gitlab.json').expectBadge({
label: 'languages',
message: isMetric,
color: 'blue',
})
t.create('language count (self-managed)')
.get('/gitlab-cn/gitlab.json?gitlab_url=https://jihulab.com')
.expectBadge({
label: 'languages',
message: isMetric,
color: 'blue',
})
t.create('language count (project not found)')
.get('/open/guoxudong.io/shields-test/do-not-exist.json')
.expectBadge({
label: 'languages',
message: 'project not found',
})

View File

@@ -13,6 +13,7 @@ const schema = Joi.object({
const queryParamSchema = Joi.object({
gitlab_url: optionalUrl,
job_name: Joi.string(),
branch: Joi.string(),
}).required()
const moreDocs = `
@@ -37,50 +38,44 @@ Also make sure you have set up code covrage parsing as described <a href="https:
</p>
`
export default class GitlabCoverage extends BaseSvgScrapingService {
export default class GitlabPipelineCoverage extends BaseSvgScrapingService {
static category = 'coverage'
static route = {
base: 'gitlab/coverage',
pattern: ':user/:repo/:branch',
base: 'gitlab/pipeline-coverage',
pattern: ':project+',
queryParamSchema,
}
static examples = [
{
title: 'Gitlab code coverage',
namedParams: {
user: 'gitlab-org',
repo: 'gitlab-runner',
branch: 'master',
},
namedParams: { project: 'gitlab-org/gitlab-runner' },
queryParams: { branch: 'master' },
staticPreview: this.render({ coverage: 67 }),
documentation: documentation + moreDocs,
},
{
title: 'Gitlab code coverage (specific job)',
namedParams: {
user: 'gitlab-org',
repo: 'gitlab-runner',
branch: 'master',
},
queryParams: { job_name: 'test coverage report' },
namedParams: { project: 'gitlab-org/gitlab-runner' },
queryParams: { job_name: 'test coverage report', branch: 'master' },
staticPreview: this.render({ coverage: 96 }),
documentation: documentation + moreDocs,
},
{
title: 'Gitlab code coverage (self-managed)',
namedParams: { user: 'GNOME', repo: 'at-spi2-core', branch: 'master' },
queryParams: { gitlab_url: 'https://gitlab.gnome.org' },
namedParams: { project: 'GNOME/at-spi2-core' },
queryParams: { gitlab_url: 'https://gitlab.gnome.org', branch: 'master' },
staticPreview: this.render({ coverage: 93 }),
documentation: documentation + moreDocs,
},
{
title: 'Gitlab code coverage (self-managed, specific job)',
namedParams: { user: 'GNOME', repo: 'libhandy', branch: 'master' },
namedParams: { project: 'GNOME/libhandy' },
queryParams: {
gitlab_url: 'https://gitlab.gnome.org',
job_name: 'unit-test',
branch: 'master',
},
staticPreview: this.render({ coverage: 93 }),
documentation: documentation + moreDocs,
@@ -96,11 +91,13 @@ export default class GitlabCoverage extends BaseSvgScrapingService {
}
}
async fetch({ user, repo, branch, baseUrl = 'https://gitlab.com', jobName }) {
async fetch({ project, baseUrl = 'https://gitlab.com', jobName, branch }) {
// Since the URL doesn't return a usable value when an invalid job name is specified,
// it is recommended to not use the query param at all if not required
jobName = jobName ? `?job=${jobName}` : ''
const url = `${baseUrl}/${user}/${repo}/badges/${branch}/coverage.svg${jobName}`
const url = `${baseUrl}/${decodeURIComponent(
project
)}/badges/${branch}/coverage.svg${jobName}`
const errorMessages = errorMessagesFor('project not found')
return this._requestSvg({
schema,
@@ -117,12 +114,11 @@ export default class GitlabCoverage extends BaseSvgScrapingService {
}
async handle(
{ user, repo, branch },
{ gitlab_url: baseUrl, job_name: jobName }
{ project },
{ gitlab_url: baseUrl, job_name: jobName, branch }
) {
const { message: coverage } = await this.fetch({
user,
repo,
project,
branch,
baseUrl,
jobName,

View File

@@ -3,28 +3,28 @@ import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Coverage (branch)')
.get('/gitlab-org/gitlab-runner/12-0-stable.json')
.get('/gitlab-org/gitlab-runner.json?branch=12-0-stable')
.expectBadge({
label: 'coverage',
message: isIntegerPercentage,
})
t.create('Coverage (existent branch but coverage not set up)')
.get('/gitlab-org/gitlab-git-http-server/master.json')
.get('/gitlab-org/gitlab-git-http-server.json?branch=master')
.expectBadge({
label: 'coverage',
message: 'not set up',
})
t.create('Coverage (nonexistent branch)')
.get('/gitlab-org/gitlab-runner/nope-not-a-branch.json')
.get('/gitlab-org/gitlab-runner.json?branch=nope-not-a-branch')
.expectBadge({
label: 'coverage',
message: 'not set up',
})
t.create('Coverage (nonexistent repo)')
.get('/this-repo/does-not-exist/neither-branch.json')
.get('/this-repo/does-not-exist.json')
.expectBadge({
label: 'coverage',
message: 'inaccessible',
@@ -32,7 +32,7 @@ t.create('Coverage (nonexistent repo)')
t.create('Coverage (custom job)')
.get(
'/gitlab-org/gitlab-runner/12-0-stable.json?job_name=test coverage report'
'/gitlab-org/gitlab-runner.json?branch=12-0-stable&job_name=test coverage report'
)
.expectBadge({
label: 'coverage',
@@ -40,14 +40,18 @@ t.create('Coverage (custom job)')
})
t.create('Coverage (custom invalid job)')
.get('/gitlab-org/gitlab-runner/12-0-stable.json?job_name=i dont exist')
.get(
'/gitlab-org/gitlab-runner.json?branch=12-0-stable&job_name=i dont exist'
)
.expectBadge({
label: 'coverage',
message: 'not set up',
})
t.create('Coverage (custom gitlab URL)')
.get('/GNOME/at-spi2-core/master.json?gitlab_url=https://gitlab.gnome.org')
.get(
'/GNOME/at-spi2-core.json?gitlab_url=https://gitlab.gnome.org&branch=master'
)
.expectBadge({
label: 'coverage',
message: isIntegerPercentage,
@@ -55,7 +59,7 @@ t.create('Coverage (custom gitlab URL)')
t.create('Coverage (custom gitlab URL and job)')
.get(
'/GNOME/libhandy/master.json?gitlab_url=https://gitlab.gnome.org&job_name=unit-test'
'/GNOME/libhandy.json?gitlab_url=https://gitlab.gnome.org&branch=master&job_name=unit-test'
)
.expectBadge({
label: 'coverage',

View File

@@ -23,9 +23,9 @@ t.create('version installs | valid: numeric version')
})
t.create('version installs | valid: alphanumeric version')
.get('/build-failure-analyzer/1.17.2-DRE3.14.json')
.get('/build-failure-analyzer/1.17.2-DRE3.21.json')
.expectBadge({
label: 'installs@1.17.2-DRE3.14',
label: 'installs@1.17.2-DRE3.21',
message: isMetric,
})

View File

@@ -27,7 +27,7 @@ t.create('total downloads (valid)')
})
t.create('total downloads (tenant)')
.get('/cefsharp.myget/cefsharp/dt/CefSharp.Common.json')
.get('/vs-devcore.myget/vs-devcore/dt/MicroBuild.json')
.expectBadge({
label: 'downloads',
message: isMetric,

View File

@@ -1,83 +1,11 @@
import Joi from 'joi'
import { starRating, metric } from '../text-formatters.js'
import { colorScale } from '../color-formatters.js'
import { nonNegativeInteger } from '../validators.js'
import { BaseJsonService } from '../index.js'
import { deprecatedService } from '../index.js'
const pkgReviewColor = colorScale([2, 3, 4])
const schema = Joi.object({
rating: Joi.number().min(0).max(1).precision(1).required().allow(null),
reviewsCount: nonNegativeInteger,
}).required()
// Repository for this service is: https://github.com/iqubex-technologies/pkgreview.dev
// Internally the service leverages the npms.io API (https://api.npms.io/v2)
export default class PkgreviewRating extends BaseJsonService {
static category = 'rating'
static route = {
export default deprecatedService({
category: 'rating',
route: {
base: 'pkgreview',
pattern: ':format(rating|stars)/:pkgManager(npm)/:pkgSlug+',
}
static examples = [
{
title: 'pkgreview.dev Package Ratings',
pattern: 'rating/:pkgManager/:pkgSlug+',
namedParams: { pkgManager: 'npm', pkgSlug: 'react' },
staticPreview: this.render({
format: 'rating',
rating: 3.5,
reviewsCount: 237,
}),
},
{
title: 'pkgreview.dev Star Ratings',
pattern: 'stars/:pkgManager/:pkgSlug+',
namedParams: { pkgManager: 'npm', pkgSlug: 'react' },
staticPreview: this.render({
format: 'stars',
rating: 1.5,
reviewsCount: 200,
}),
},
]
static render({ rating, reviewsCount, format }) {
const message =
format === 'rating'
? `${+parseFloat(rating).toFixed(1)}/5 (${metric(reviewsCount)})`
: starRating(rating)
return {
message,
label: format,
color: pkgReviewColor(rating),
}
}
async fetch({ pkgManager, pkgSlug }) {
return this._requestJson({
schema,
url: `https://pkgreview.now.sh/api/v1/${pkgManager}/${encodeURIComponent(
pkgSlug
)}`,
errorMessages: {
404: 'package not found',
},
})
}
async handle({ format, pkgManager, pkgSlug }) {
const { reviewsCount, rating } = await this.fetch({
pkgManager,
pkgSlug,
})
return this.constructor.render({
reviewsCount,
format,
rating: rating * 5,
})
}
}
pattern: ':various*',
},
label: 'pkgreview',
dateAdded: new Date('2022-10-07'),
})

View File

@@ -1,23 +1,15 @@
import { withRegex, isStarRating } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
import { ServiceTester } from '../tester.js'
const isRatingWithReviews = withRegex(
/^(([0-4](.?([0-9]))?)|5)\/5?\s*\([0-9]*\)$/
)
export const t = new ServiceTester({
id: 'pkgreview',
title: 'PkgReview',
pathPrefix: '/pkgreview',
})
t.create('Stars Badge renders')
t.create('Stars Badge')
.get('/stars/npm/react.json')
.expectBadge({ label: 'stars', message: isStarRating })
.expectBadge({ label: 'pkgreview', message: 'no longer available' })
t.create('Rating Badge renders')
t.create('Rating Badge')
.get('/rating/npm/react.json')
.expectBadge({ label: 'rating', message: isRatingWithReviews })
t.create('nonexistent package')
.get('/rating/npm/ohlolweallknowthispackagewontexist.json')
.expectBadge({
label: 'rating',
message: 'package not found',
color: 'red',
})
.expectBadge({ label: 'pkgreview', message: 'no longer available' })

View File

@@ -35,7 +35,7 @@ class PowershellGalleryPlatformSupport extends BaseXmlService {
static examples = [
{
title: 'PowerShell Gallery',
namedParams: { packageName: 'DNS.1.1.1.1' },
namedParams: { packageName: 'PackageManagement' },
staticPreview: this.render({
platforms: ['windows', 'macos', 'linux'],
}),

View File

@@ -47,7 +47,7 @@ t.create('version (legacy redirect: vpre)')
.get('/vpre/ACMESharp.svg')
.expectRedirect('/powershellgallery/v/ACMESharp.svg?include_prereleases')
t.create('platform (valid').get('/p/DNS.1.1.1.1.json').expectBadge({
t.create('platform (valid)').get('/p/PackageManagement.json').expectBadge({
label: 'platform',
message: isPlatform,
})

View File

@@ -26,7 +26,7 @@ export default class PubPoints extends BaseJsonService {
keywords,
documentation,
namedParams: { packageName: 'analysis_options' },
staticPreview: this.render({ grantedPoints: 120, maxPoints: 130 }),
staticPreview: this.render({ grantedPoints: 120, maxPoints: 140 }),
},
]

View File

@@ -7,7 +7,7 @@ t.create('pub points (valid)')
.get('/analysis_options.json')
.expectBadge({
label: 'points',
message: Joi.string().regex(/^\d+\/130$/),
message: Joi.string().regex(/^\d+\/140$/),
})
t.create('pub points (not found)').get('/analysisoptions.json').expectBadge({

View File

@@ -62,7 +62,10 @@ t.create('valid repo -- unregistered')
color: COLOR_MAP.unregistered,
})
t.create('invalid repo').get('/github.com/repo/invalid-repo.json').expectBadge({
label: 'reuse',
message: 'Not a Git repository',
})
t.create('invalid repo')
.timeout(15000)
.get('/github.com/repo/invalid-repo.json')
.expectBadge({
label: 'reuse',
message: 'Not a Git repository',
})

View File

@@ -155,6 +155,15 @@ const isCustomCompactTestTotals = makeCompactTestTotalsValidator({
skipped: '🤷',
})
const isOrdinalNumber = Joi.string().regex(/^[1-9][0-9]*(ᵗʰ|ˢᵗ|ⁿᵈ|ʳᵈ)$/)
const isOrdinalNumberDaily = Joi.string().regex(
/^[1-9][0-9]*(ᵗʰ|ˢᵗ|ⁿᵈ|ʳᵈ) daily$/
)
const isHumanized = Joi.string().regex(
/[0-9a-z]+ (second|seconds|minute|minutes|hour|hours|day|days|month|months|year|years)/
)
export {
isSemver,
isVPlusTripleDottedVersion,
@@ -187,4 +196,7 @@ export {
isCustomCompactTestTotals,
makeTestTotalsValidator,
makeCompactTestTotalsValidator,
isOrdinalNumber,
isOrdinalNumberDaily,
isHumanized,
}

View File

@@ -124,9 +124,11 @@ function formatDate(d) {
}
function formatRelativeDate(timestamp) {
return dayjs()
.to(dayjs.unix(parseInt(timestamp, 10)))
.toLowerCase()
const parsedDate = dayjs.unix(parseInt(timestamp, 10))
if (!parsedDate.isValid()) {
return 'invalid date'
}
return dayjs().to(parsedDate).toLowerCase()
}
export {

View File

@@ -153,5 +153,11 @@ describe('Text formatters', function () {
.describe('when given the beginning of october')
.expect('a month ago')
})
test(formatRelativeDate, () => {
given(9999999999999)
.describe('when given invalid date')
.expect('invalid date')
})
})
})

View File

@@ -0,0 +1,126 @@
import Joi from 'joi'
import dayjs from 'dayjs'
import calendar from 'dayjs/plugin/calendar.js'
import duration from 'dayjs/plugin/duration.js'
import relativeTime from 'dayjs/plugin/relativeTime.js'
import { BaseJsonService } from '../index.js'
import { metric as formatMetric, ordinalNumber } from '../text-formatters.js'
dayjs.extend(calendar)
dayjs.extend(duration)
dayjs.extend(relativeTime)
const schema = Joi.object({
Keys: Joi.alternatives(Joi.string(), Joi.number()).required(),
Clicks: Joi.alternatives(Joi.string(), Joi.number()).required(),
UptimeSeconds: Joi.alternatives(Joi.string(), Joi.number()).required(),
Download: Joi.string().required(),
Upload: Joi.string().required(),
Ranks: Joi.object({
Keys: Joi.string().required(),
Clicks: Joi.string().required(),
Download: Joi.string().required(),
Upload: Joi.string().required(),
Uptime: Joi.string().required(),
}),
}).required()
const queryParamSchema = Joi.object({
rank: Joi.equal(''),
}).required()
export default class WhatPulse extends BaseJsonService {
static category = 'activity'
static route = {
base: 'whatpulse',
pattern:
':metric(keys|clicks|uptime|download|upload)/:userType(user|team)/:id',
queryParamSchema,
}
static examples = [
{
title: 'WhatPulse user metric',
namedParams: { metric: 'keys', userType: 'user', id: '179734' },
staticPreview: this.render({
metric: 'keys',
metricValue: '21G',
}),
},
{
title: 'WhatPulse team metric - rank',
namedParams: {
metric: 'upload',
userType: 'team',
id: 'dutch power cows',
},
queryParams: { rank: null },
staticPreview: this.render({
metric: 'upload',
metricValue: '1ˢᵗ',
}),
},
]
static defaultBadgeData = { label: 'whatpulse' }
static render({ metric, metricValue }) {
return {
label: metric,
message: metricValue,
color: 'informational',
}
}
async fetch({ userType, id }) {
return await this._requestJson({
schema,
url: `https://api.whatpulse.org/${userType}.php?${userType}=${id}&format=json`,
})
}
toLowerKeys(obj) {
return Object.keys(obj).reduce((accumulator, key) => {
accumulator[key.toLowerCase()] = obj[key]
return accumulator
}, {})
}
transform({ json, metric }, { rank }) {
// We want to compare with lowercase keys from the WhatPulse's API.
const jsonLowercase = this.toLowerKeys(json)
jsonLowercase.ranks = this.toLowerKeys(json.Ranks)
// Just metric, no rank.
if (rank === undefined) {
if (metric === 'uptime') {
return dayjs.duration(jsonLowercase.uptimeseconds, 'seconds').humanize()
}
let metricValue
metricValue = jsonLowercase[metric]
if (metric === 'keys' || metric === 'clicks') {
metricValue = formatMetric(metricValue)
}
if (metric === 'upload' || metric === 'download') {
metricValue = metricValue.replace(/([A-Za-z]+)/, ' $1')
}
return metricValue
}
// Rank achieved by the user/team with the given metric.
const rankFromResp = jsonLowercase.ranks[metric]
return ordinalNumber(rankFromResp)
}
async handle({ metric, userType, id }, { rank }) {
const json = await this.fetch({ userType, id, metric })
const metricValue = this.transform({ json, metric }, { rank })
return this.constructor.render({ metric, metricValue })
}
}

View File

@@ -0,0 +1,42 @@
import { createServiceTester } from '../tester.js'
import {
isFileSize,
isHumanized,
isMetric,
isOrdinalNumber,
} from '../test-validators.js'
export const t = await createServiceTester()
t.create('WhatPulse user as user id, uptime')
.get('/uptime/user/179734.json')
.expectBadge({ label: 'uptime', message: isHumanized })
t.create('WhatPulse user as user name, keys')
.get('/keys/user/jerone.json')
.expectBadge({ label: 'keys', message: isMetric })
t.create('WhatPulse team as team id, clicks')
.get('/clicks/team/1295.json')
.expectBadge({ label: 'clicks', message: isMetric })
t.create('WhatPulse team as team id, download')
.get('/download/team/1295.json')
.expectBadge({ label: 'download', message: isFileSize })
t.create('WhatPulse team as team id, upload')
.get('/upload/team/1295.json')
.expectBadge({ label: 'upload', message: isFileSize })
t.create('WhatPulse team as team name, keys - from Ranks')
.get('/keys/team/dutch power cows.json?rank')
.expectBadge({ label: 'keys', message: isOrdinalNumber })
t.create(
'WhatPulse invalid metric name (not one of the options from the modal`s dropdown)'
)
.get('/UpTIMe/user/jerone.json')
.expectBadge({ label: '404', message: 'badge not found' })
t.create('WhatPulse incorrect user name')
.get('/uptime/user/NonExistentUsername.json')
.expectBadge({ label: 'whatpulse', message: 'invalid response data' })

View File

@@ -190,6 +190,22 @@ t.create('Plugin Required PHP Version')
t.create('Plugin Required PHP Version (Not Set)')
.get('/plugin/required-php/akismet.json')
.intercept(nock =>
nock('https://api.wordpress.org')
.get('/plugins/info/1.2/')
.query(mockedQuerySelector)
.reply(200, {
version: '1.2',
rating: 80,
num_ratings: 100,
downloaded: 100,
active_installs: 100,
requires: false,
tested: '4.0.0',
last_updated: '2020-01-01 7:21am GMT',
requires_php: false,
})
)
.expectBadge({
label: 'php',
message: 'not set for this plugin',