Commit Graph
1463 Commits
Author SHA1 Message Date
5405dad389 [BitbucketLastCommit] Add Bitbucket last commit (#10043)
* Add Bitbucket last commit

* Update schemas

* Limit API results to 1

* Make `branch` a required path param

Co-authored-by: chris48s <chris48s@users.noreply.github.com>

* Better message for no commits found

* Update 404 message

* Use common `relativeUri` validator for `path`

---------

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2024-03-25 15:05:32 +00:00
4f141dfa84 [GithubLastCommit] [GitlabLastCommit] [GiteaLastCommit] Support file path for last commit (#10041)
* Support file path for GitHub last commit

* Support file path for GitLab last commit

* Support file path for Gitea last commit

* Define common `relativeUri` validator

* Sort imports

* Add more tests for path variations

* Fix test name

Co-authored-by: chris48s <chris48s@users.noreply.github.com>

* Update Gitea 404 message

* Handle case when no commits are returned for GitHub and GitLab

---------

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2024-03-25 12:10:04 +00:00
chris48sandGitHub bd3a11b4b6 upgrade to docusaurus 3 (#9820)
* update packages

* add plugin to strip autolinks in code blocks

* fix all the documentation for MDXv3

* remove check-docusaurus-versions

in docusaurus 3 this is now a hard error, not just a warning

* port upstream change to Curl component

fixes performing the 'execute' action when pressing enter
2024-03-23 19:54:57 +00:00
chris48sandGitHub df8049a765 redirect [npm] /dt to /d18m (#10033)
* redirect [npm] /dt to /d18m

* fix unit test
2024-03-23 19:38:05 +00:00
MoandGitHub 1cf1c0a352 Add [JSR] version service (#10030)
* feat: add JSR version badge

* change the label to lowercase

* fix tests
2024-03-18 13:53:59 +00:00
jNulljandGitHub c6be456d9c Add [snapcraft] version badge (#9976)
* Add snapstore version badge

Fixes badges/shields#9103

* Add basic test for Snapcraft version

* Handle snapstore-version - package not found

* Add test for invalid snapcraft package

* Remove redundent SnapstoreBase class

not needed as there is no auth

* Remove logo from default

The project convention is using namedLogo by default only for social badges.
This commit removes the default logo usage as this badge is not in the social category.

* Rename snapstore to snapcraft

Keep 1 convention for the snapcraft badge, use only snapcraft and ditch snapstore.

* Fix SnapcraftVersion schema

* Use renderVersionBadge

Replace the costume render in SnapcraftVersion with renderVersionBadge

* Rename folder from snapstore to snapcraft

* Add track & risk path parameters for SnapcraftVersion

enhancing control and clarity

* Add architecture query parameter to SnapcraftVersion

Added architecture query parameter: The snapcraft-version.service.js file now accepts an optional arch query parameter to specify the desired architecture for the Snap package. This defaults to amd64 if not provided.

If an unsupported architecture is specified in the query parameter, a NotFound error is thrown with a specific message indicating that the requested architecture is not found.

The snapcraft-version.tester.js file is updated to include a new test case that verifies the behavior when using the arch query parameter and also includes a test case for handling an invalid architecture.

* move filter logic into a transform function

* Fix filter logic

The goal here was to filter by all conditions with logic and.
Before this fix the only the logic of the last filter is used.

* Add tests for SnapcraftVersion.transform
2024-03-10 10:12:58 +00:00
CanisHelixandGitHub 7f3102fd68 feat(gitea): add last commit badge (#9995) 2024-02-27 19:38:22 +00:00
ea9445b74e [GithubCreatedAt] Add Created At Badge for Github (#9981)
* init GithubCreatedAt service

* render raw created_at

* impl formatted date

* add color

* add test for absent repo

* add `reversed` parameter to `age` color formatter

* inverse the colors of the badge

---------

Co-authored-by: Studio <studio@192.168.1.20>
2024-02-26 20:01:48 +00:00
Juliette CordorandGitHub e87d82f22c Added custom bucket url support for [Scoop] (#9984)
* added support for custom bucket urls in Scoop Version shield

* tolerate URLs with a trailing slash

* added description with example to bucket query param
2024-02-25 12:04:49 +00:00
chris48sandGitHub 9cfd301b82 Complete the examples --> openApi migration; affects [node sonar travis wordpress visualstudio librariesio] (#9977)
* you missed one

* remove examples from deprecatedService()

I'm not going to replace this with openApi
We have zero examples of deprecated services that declare examples

* remove examples from redirector()

* update test

* remove compatibility code for converting examples to openApi

* remove all the code for handling examples

* remove a few bits of redundant code

* improve docs for openApi property

* last one, I promise
2024-02-24 18:14:44 +00:00
jNulljandGitHub 8ab9dfa9a1 Improve our approach for testing auth (part 1) (#9681)
* improve stackexchange auth testing

Change auth tests to include all shields of the base class.
The code is formated to be used in more general cases and increases code reuseability.

* Remove dummy auth test

We already test all existing classes, no need for a dummy

* Add getBadgeExampleCall to test-helpers

Add getBadgeExampleCall to extract the first OpenAPI example then reformat it for service invoke function.

* Use getBadgeExampleCall in stackexchange-base tests

* Fix getBadgeExampleCall Errors

* Add testAuth to test-helpers

Add the testAuth function which tests auth of a service (badge) using a provided dummy response.

* Refactor stackexchange-base.spec.js to use testAuth from test-helpers

* Split stackexchange-base.spec into per service test file

* Add all auth methods to testAuth

Add all auth methods used to testAuth to be generic and used by all services.
Add helper functions to make testAuth more readable

* Handle non-default bearer and api headers

* Add discord.spec.js as first attempt for bearer auth

* Fix basic auth user

* Add dynamic authorizedOrigins

* Add header optional argument

* Add obs as basicAuth example

* Use apiHeaderKey and bearerHeaderKey function params

Use apiHeaderKey & bearerHeaderKey as function params rather then extracting them with regex from function strings.

Those options are now part of an options object param joined with the contentType that replaces header.

header was originaly added for setting content type of the reply, so it makes more sense to directly set the content type

* Remove old comment

* Allow any pass & user key for QueryStringAuth

Before this commit the QueryStringAuth would only work for the key of stackexchange.
This commit makes the testAuth function generic and allows passing user and pass keys.

* Add auth test for PepyDownloads

* Fix wrong header for jwt login

Might set wrong header for jwt login request.
This commit fixes that.

* Support multiple authOrigins in testAuth

Some services might have more then one authOrigin.
This commit makes sure we test for redundent authOrigins as well as support requests to them if needed.

* Add docker-automated auth test

* Fix JwtAuth testing by introducing mandatory jwtLoginEndpoint

Prior to this change, JwtAuth testing would lead to erros due to the absence of a specified login endpoint,
Nock would be dumplicated for both login and non login hosts and indicate a missing request.

This commit enforces the requirement for a new jwtLoginEndpoint argument when testing JwtAuth.
The argument seperates the endpoint nock scope from the behavior of the request nock.

* Fix type test in generateFakeConfig
2024-02-21 18:33:45 +00:00
Eray Erdin (&mut self)andGitHub 503764e6b9 [NpmUnpackedSize] Unpacked Size Badge (#9954)
* init npm-unpacked-size service

* add sample badge

* fetch unpacked size from latest version

* format unpacked size

* parametrize unpacked size by package name

* add optional version parameter

* fix typo on test

* rename test to tester

* test against json endpoint instead of svg

* test and impl version with undefined unpacked size

* test version with defined unpacked size

* change color to lightgray when unpackedSize is undefined

* add openapi docs

* extend NpmBase instead of BaseJsonService

* use isFileSize validator

* add schema to validate npm registry response body

* add tests for scoped packages

* impl scoped package route

* change the type of schema.dist.unpackedSize to optionalNonNegativeInteger

* add registry_uri query param

* add default label to badge

* unpack tag instead of version

* revert back to versions instead of tags
2024-02-19 09:34:57 +00:00
a8d5697615 [Website] Render status: down badge if website is unresponsive (#9966)
* test unresponsive website

* render down badge if website is unresponsive

* use built-in timeout option from got client

* reply with 200 after delay

* add a note to the docs

---------

Co-authored-by: chris48s <git@chris-shaw.dev>
2024-02-19 09:15:39 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>chris48s
a68e47cb72 chore(deps): bump webextension-store-meta from 1.0.5 to 1.1.0; run [chromewebstore] (#9972)
* chore(deps): bump webextension-store-meta from 1.0.5 to 1.1.0

Bumps [webextension-store-meta](https://github.com/awesome-webextension/webextension-store-meta) from 1.0.5 to 1.1.0.
- [Changelog](https://github.com/awesome-webextension/webextension-store-meta/blob/main/CHANGELOG.md)
- [Commits](https://github.com/awesome-webextension/webextension-store-meta/commits)

---
updated-dependencies:
- dependency-name: webextension-store-meta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* deprecate price badge

`price` and `priceCurrency` fields have been removed

* fix formatting on users badge

---------

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>
2024-02-18 20:08:50 +00:00
chris48sandGitHub e419a25981 deprecate TAS (#9932) 2024-02-14 18:53:08 +00:00
Pierre-Yves BigourdanandGitHub cb2ebe2e94 migrate examples to openApi part 37; affects [bitbucket bitrise chromewebstore circleci] (#9881)
* migrate some services from examples to openApi

* Fix Bitbucket tests and examples

* Fix CircleCI and Bitrise tests

* Use fake token in Bitrise examples

* Use JohnEstropia/CoreStore token in Bitrise tests
2024-02-14 18:52:47 +00:00
chris48sandGitHub c121889bdd migrate some services from examples to openApi part 46; affects [codeclimate librariesio nexus] and securityheaders (#9933)
* fix codeclimate tests

* migrate some services from examples to openApi

* fix nexus service tests

* update codeclimate tests again
2024-02-13 19:33:28 +00:00
372052c6b1 [GITEA] add forks, stars, issues and pr badges (#9923)
* feat(gitea): add forks, stars, issues and pr badges

* doc(comment): update comments

* fix(gitea): update based on feedback

* refactor(fetch): refactor fetch to be more generic

* refactor(fetch): remove unused function

* use isMetric

---------

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2024-02-11 15:17:31 +00:00
chris48sandGitHub 095e4f889a migrate some services from examples to openApi part 45; affects [github coveralls visualstudiomarketplace] (#9930)
* migrate some services from examples to openApi

* update e2e test to use simpler example
2024-02-11 13:04:42 +00:00
chris48sandGitHub 79bd5f3837 migrate some services from examples to openApi part 47; affects [docker] (#9934)
* fix service test

* migrate some services from examples to openApi
2024-02-11 13:03:50 +00:00
chris48sandGitHub 9d2a568a90 tolerate missing short_version in [visualstudioappcenter] (#9951) 2024-02-11 13:03:37 +00:00
e36d933d12 [Crates] Only use non-yanked crate versions (ready for merge) (#9949)
* prototype fix msrv using yanked versions

* make it prettier

* deduplicate schema definition and add version info helper function

* use newest version only if it wasnt yanked

* fix variable name typo

* remove unused import

* try add new test

* satisfy linter

* don't import "describe()"

* fixup

---------

Co-authored-by: chris48s <git@chris-shaw.dev>
2024-02-05 11:05:47 +00:00
chris48sandGitHub 39ec09329a migrate some services from examples to openApi part 44; affects [sonar] (#9919)
* fix sonar tests

* migrate some services from examples to openApi

* migrate some services from examples to openApi
2024-02-05 11:01:58 +00:00
chris48sandGitHub 1ed54400aa migrate some services from examples to openApi part 43; affects [jenkins] (#9918)
* update jenkins service tests

* migrate some services from examples to openApi
2024-02-04 21:01:53 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>chris48s
2588797365 chore(deps): bump smol-toml from 1.1.3 to 1.1.4; test [PythonVersionFromToml DynamicToml] (#9925)
* chore(deps): bump smol-toml from 1.1.3 to 1.1.4

Bumps [smol-toml](https://github.com/squirrelchat/smol-toml) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/squirrelchat/smol-toml/releases)
- [Commits](https://github.com/squirrelchat/smol-toml/compare/v1.1.3...v1.1.4)

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

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

* encode ° symbol in test

---------

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>
2024-01-29 11:29:23 +00:00
chris48sandGitHub 4319367c40 migrate some services from examples to openApi (#9904) 2024-01-29 11:05:40 +00:00
chris48sandGitHub af19335c5a migrate some services from examples to openApi (#9915) 2024-01-29 11:05:35 +00:00
1b91ef57c1 migrate some services from examples to openApi part 39; affects [maven gradle] (#9902)
* allow redirectors to define a openApi property

* migrate some services from examples to openApi

* Update services/gradle-plugin-portal/gradle-plugin-portal.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

* Update services/gradle-plugin-portal/gradle-plugin-portal.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

* Update services/maven-central/maven-central.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

* Update services/maven-central/maven-central.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

* Update services/maven-metadata/maven-metadata.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

* Update services/maven-metadata/maven-metadata.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

---------

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>
2024-01-24 20:36:32 +00:00
chris48sandGitHub bc41c409ff migrate some services from examples to openApi (#9903) 2024-01-24 20:23:12 +00:00
e032f3d4b7 feat: added up_message and down_message to [uptimerobotstatus] (#9662)
* feat: added up_message and down_message into uptimerobot-status [8816-issue]

* implement up/down color params, add query params to docs

---------

Co-authored-by: chris48s <git@chris-shaw.dev>
2024-01-23 19:05:13 +00:00
Andrea BonariandGitHub c5943c0f2d Add [Hangar] Badges (#9800)
* Add Hangar service

* fix linting

* Added required changes

* Fix inconsistent openApi pattern

* Change hangar host
2024-01-16 20:16:04 +00:00
5fb78c50ef migrate examples to openApi part 38; affects [github] (#9889)
* migrate some services from examples to openApi

* Update services/github/github-size.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

---------

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>
2024-01-13 18:31:59 +00:00
chris48sandGitHub 5fa3435841 [crates] tidyup (#9883)
* fix downloads service test

* remove handling of 200 OK with an error body

* remove obsolete tests
2024-01-13 18:25:40 +00:00
4a55c3eaa4 Add Support for [Nostr] Followers (#9870)
* add nostr followers with tests

* fix broken test

* fix http error handler

* rename route from nostr to nostr-band

* remove unnecessary test cases

* edit test expectation

* validate data schema ensuring exact one key

* remove unavailable named logo

* migrate examples to openApi

* Update services/nostr-band/nostr-band-followers.tester.js

* remove unused import

---------

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
Co-authored-by: chris48s <git@chris-shaw.dev>
2024-01-11 19:35:03 +00:00
Joe ClackandGitHub bfcbaea116 replace experimental API usage with newly available v1 API (#9886)
resolves badges/shields#9837
2024-01-09 16:36:11 +00:00
CanisHelixandGitHub 79dd749608 Update [Gitea] defaults to gitea.com (#9872)
* fix(gitea): set gitea.com as default, update tests and message

* fix(gitea): removed required flag

* test(gitea): migrate tests to try.gitea.io

* fix(test): fix auth test nock

* fix(ci): revert tests to codeberg, update description with better verbiage, rename documenation to description

* doc(api): reference flagship url for swagger information in comments
2024-01-08 14:58:59 +00:00
SkyandGitHub 57aaaad7fe [crates] MSRV Badge (#9871)
Crates.io MSRV: `/crates/msrv/:crate`
Crates.io MSRV (version): `/crates/msrv/:crate/:version`
2024-01-07 20:54:27 +00:00
chris48sandGitHub 9493d00483 migrate examples to openApi part 35; affects [npm] (#9866)
* migrate some services from examples to openApi

* clarify docs on scoped/unscoped packages
2024-01-06 16:41:42 +00:00
chris48sandGitHub a388c6e698 migrate examples to openApi part 36; affects [myget nuget resharper chocolatey powershellgallery] (#9873)
* update resharper tests

* migrate some services from examples to openapi
2024-01-06 16:41:37 +00:00
GuillaumeGandGitHub 34ef876be5 Add [galaxytoolshed] Version (#8249)
* feat(services): galaxytoolshed, add version and update base schema

* fix(services): galaxytoolshed, update schema

* fix(services): galaxytoolshed, preview updated

* fix(services): galaxytoolshed, enable openApi for version

* fix(services): galaxytoolshed, version labels
2024-01-05 17:36:51 +00:00
chris48sandGitHub e8a148eed3 migrate examples to openApi part 34; affects [github] (#9865)
* fix github service tests

* migrate some services from examples to openApi

* document latest variant with separate examples

making seperate routes for the /{version} and /latest variants
allows us to only show the docs for
- include_prereleases
- sort and
- filter
in the situation where they are relevant
2024-01-04 20:02:03 +00:00
Pierre-Yves BigourdanandGitHub 89f5acfc9d migrate examples to openApi part 33; affects [bower drone localizely mozillaobservatory pythonversionfromtoml] (#9864)
* migrate some services from examples to openApi

* Fix Drone examples and tests

* Separate Mozilla Observatory publish documentation
2024-01-01 17:38:03 +00:00
chris48sandGitHub a7f2396202 migrate some services from examples to openApi part 31; affects [packagecontrol discourse] (#9858)
* migrate some services from examples to openApi

* update e2e test assertion
2024-01-01 10:32:38 +00:00
chris48sandGitHub 09c83d9d46 migrate some services from examples to openApi (#9857) 2024-01-01 10:32:36 +00:00
chris48sandGitHub 8d7258b344 migrate some services from examples to openApi (#9856) 2023-12-31 19:39:00 +00:00
Pierre-Yves BigourdanandGitHub 66af65c9e2 migrate examples to openApi part 32; affects [azuredevops youtube] (#9861)
* migrate some services from examples to openApi

* Use testResultOpenApiQueryParams instead of redefining queryParams
2023-12-31 16:46:01 +00:00
chris48sandGitHub 880c1fb49c call [docker] with auth (#9803)
* allow user to set dockerhub credentials

* add withJwtAuth function to AuthHelper

* use withJwtAuth in DockerHub badges

* add unit tests for JWT auth

* use auth when calling docker cloud

* refactor and assert fetch helpers call withJwtAuth

* store token for a max duration (defaults to 1 hour)

* tangent: update test example
2023-12-31 14:55:18 +00:00
chris48sandGitHub bfa712469a migrate some services from examples to openApi part 28; affects [aur cran mastodon matrix npmstat nyc thunderstore twitter] (#9855)
* migrate some services from examples to openApi

* always use capitals in period/interval description
2023-12-31 14:14:57 +00:00
Pierre-Yves BigourdanandGitHub 04254e5905 Ensure social category badges are rendered with social style and logo; affects [gitlab keybase lemmy modrinth thunderstore twitch] gist github reddit (#9859)
* Ensure social category badges are rendered with social style and logo

* Fix Twitch auth test
2023-12-31 14:08:55 +00:00
Pierre-Yves BigourdanandGitHub 3300e4a09d Small [YouTube] cleanup (#9860) 2023-12-30 18:07:08 +00:00