Commit Graph

1362 Commits

Author SHA1 Message Date
chris48s
384fa4d38f [twitter] --> x (#9496) 2023-08-23 19:51:18 +00:00
Prashant Rawat
531d2acf5c add docstrings for website status service (#9495) 2023-08-21 11:10:06 +00:00
chris48s
4f67ab7a09 migrate examples to openApi part5; affects [itunes jetbrains jitpack keybase lemmy luarocks maintenance openvsx] (#9431)
* migrate some services from examples to openApi

* improve and de-dupe service titles

* revert changes to jsdelivr

* Update services/jetbrains/jetbrains-downloads.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>
2023-08-21 11:16:01 +01:00
chris48s
6823d38ddf migrate examples to openApi part 4; affects [ecologi elm flathub gem gitter GithubTotalDiscussions greasyfork hackage hackernews homebrew] (#9430)
* migrate some services from examples to openApi

* improve and de-dupe service titles

* revert changes to homebrew
2023-08-21 10:08:27 +00:00
CRIMX
ad359a260c [bundlejs] add badge for the npm package size (#9055)
* feat(service): add bundlejs

* refactor: implement first hit timeout pattern

* refactor: update http error message

* test(bundlejs): remove timeout

* refactor(bundlejs): move exports to query params

* refactor(bundlejs): show errors as timeout only

* test(bundlejs): add timeout and 404 mock
2023-08-20 18:39:39 +00:00
chris48s
8f76982e1c Switch [OpenCollective] badges to use GraphQL and auth (#9387)
* [OpenCollective] update opencollective to api v2 (#9346)

* update opencollective to api v2

* fix tests

* fix: do not filter by accountType for opencollective/all

* remove 404

* remove required in schema

* cnt -> count

* keep by-tier code as-is

---------

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>

* allow calling OpenCollective api with an auth token

* add test for opencollective auth

* cache OpenCollective badges for longer

---------

Co-authored-by: xxchan <xxchan22f@gmail.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-08-20 18:24:38 +00:00
chris48s
692829f91c migrate examples to openApi part 6; affects [opencollective opm ossf powershell pub pypi reddit repology] (#9462)
* migrate some services from examples to openApi

* improve and de-dupe service titles
2023-08-19 04:33:27 +00:00
chris48s
478b1083f2 migrate examples to openApi part 3; affects [conan cookbook coverity cpan debian docker docsrs dub eclipse] (#9429)
* migrate some services from examples to openApi

* improve and de-dupe service titles

* revert changes to depfu
2023-08-17 20:32:01 +00:00
confused_techie
d73a5ebb1a [Pulsar] Add Pulsar Badges for Stargazers & Downloads (#8767)
* Added pulsar-edit Downloads & Stargazers

* Manage colour similar to how Docker Badges do

* Fixed typo in colour

* Or it seems no other (not found) tests check colour, likely overrided elsewhere

* Remove usage of 'Edit'

* errorMessages => httpErrors && downloads => dt

---------

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2023-08-15 08:34:55 +00:00
Sandro Marques
96e9e130de Add [CurseForge] badges (#9252)
* add curseforge downloads badge

* Add more [CurseForge] badges

Adds the following badges:
 - /curseforge/dt/:projectId (downloads)
 - /curseforge/game-versions/:projectId (game versions)
 - /curseforge/v/:projectId (version)

The following secret:
 - CURSEFORGE_API_KEY (yml: private.curseforge_api_key)

* Remove default logo from badges

* Linter fixes

* Rename `errorMessages` to `httpErrors`

* Remove namedLogo from ModrinthGameVersions badge

* Remove namedLogo from ModrinthVersion badge

* Remove namedLogo from ModrinthFollowers badge

---------

Co-authored-by: Minecraftschurli <minecraftschurli@gmail.com>
Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>
2023-08-13 18:00:40 +00:00
Prashant Rawat
a94115fbb0 Add docstrings for version service (#9411)
* add docstrings for version service

* replace curly quotes with single quotes

* use @example to write sample use cases

* update descriptions

* update jsdoc for rangeStart function
2023-08-11 15:09:33 +00:00
chris48s
b2f47a3303 migrate examples to openApi part 2; affects [archlinux bitcomponents bountysource cdnjs chrome clearlydefined clojars cocoapods coincap] (#9428)
* convert an example that doesn't matter

* migrate some services from examples to openApi

* improve and de-dupe service titles

* revert changes to codefactor
2023-08-08 23:57:47 +00:00
chris48s
c586960ce8 allow calling [github] without auth (#9427)
* allow calling [github] without auth

* set a default for authType, fix broken tests
2023-08-07 14:51:18 +00:00
chris48s
d4faad1139 fix [github] service tests (#9425)
* bring GH downloads/release errors into line

* update GH lerna test example

* update GH package.json test example

* update GH pipenv test example

* update GH search test assertion
2023-08-07 14:37:03 +00:00
chris48s
57c2ba0d68 Convert examples arrays to openApi objects (part 1) (#9320)
* add helper functions for generating Open API path/query params with defaults

* tweak Open API schema

- make description optional
- allow null example + allowEmptyValue (for boolean query params)

* convert examples --> openApi in amo

* convert examples --> openApi in ansible

* convert examples --> openApi in appveyor build/job

* add re-usable Open API query param for test-results badges

we can use these for all the 'test results' badges

* convert examples --> openApi in appveyor tests

* DRY up existing dynamic/endpoint param definitions

* DRY up queryParam

* allow enum param in serviceDefinition schema

* improve misleading param name

* check route and openApi are consistent on service load

* fix mistake in ansible role route

* documentation --> description

* add pathParams and queryParams helpers +docstrings

* give everything a search-friendly summary, check for duplicate summary

* prettier fixup
2023-07-31 12:22:33 +01:00
chris48s
631ca1ccb6 add some tests for [docsrs] (#9423) 2023-07-31 03:06:20 +00:00
Nemo157
2e2959a12c Migrate from docs.rs' builds API to status API (#9422) 2023-07-30 16:01:50 +00:00
empathicqubit
436f3a1a3f [OpenVSX] Fix OpenVSX API call for unversioned package URLs (#9408) 2023-07-23 09:39:43 +00:00
Kavin
528165f65c Add support for [Lemmy] (#9368)
* Add support for Lemmy.

* Add tests for lemmy.

* Remove specifying a server fqdn to fetch from.

* Fix for requested changes.
2023-07-17 15:53:58 +00:00
Pierre-Yves Bigourdan
e7fc6d56d3 Go back to default YouTube cache (#9372) 2023-07-14 15:42:50 +01:00
chris48s
83c22ccd55 cache docker badges for longer (take 3) (#9369) 2023-07-12 20:28:05 +01:00
dependabot[bot]
b9d96755ec chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 (#9357)
* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0)

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

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

* reformat all the things (prettier 3)

* update tests to await calls to prettier.format()

---------

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>
2023-07-10 09:27:51 +00:00
chris48s
fb794ec479 Revert "[OpenCollective] update opencollective to api v2 (#9346)" (#9362)
This reverts commit e02c8aa884.
2023-07-08 13:13:06 +01:00
chris48s
71cd657e3c improve docs for github issues search badge (#9360)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-08 10:52:03 +00:00
xxchan
e02c8aa884 [OpenCollective] update opencollective to api v2 (#9346)
* update opencollective to api v2

* fix tests

* fix: do not filter by accountType for opencollective/all

* remove 404

* remove required in schema

* cnt -> count

* keep by-tier code as-is

---------

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-08 10:18:02 +00:00
jNullj
1251adaec2 Add [GitHubDiscussionsSearch] and GitHubRepoDiscussionsSearch service (#9340)
* Add GitHub Discussions custom search service

This commit adds a GitHub Discussions custom search service in the github-discussions-custom-search.service.js file. It includes classes for global discussions search (GithubDiscussionsSearch) and repository-specific discussions search (GithubRepoDiscussionsSearch). Users can now search discussions with custom queries and retrieve the discussion count.

Fixes #9213

* Add tester to GithubDiscussionsSearch

* Add documentation for GithubDiscussionsSearch

Inform users of filters and query values for the free search.

* Update GithubDiscussionsSearch examples

Change examples from filter by author to `filter` by `answered-by` as this has higher change of being a more common use case.

* fix typo

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2023-07-07 20:30:16 +00:00
chris48s
1543d0f363 Allow user to filter github tags and releases (#9193)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-03 20:27:31 +00:00
chris48s
e7197f6db4 don't URL encode slash in [githubactionsworkflow] badge (#9322)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-03 20:01:13 +00:00
chris48s
7bad3f5902 deprecate [snyk] badges (#9349)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-03 16:59:04 +00:00
chris48s
1afa3b7871 increase max-age on [docker] badges, again (#9350) 2023-07-03 11:48:50 -05:00
chris48s
bf0395dc00 cache [dockerpulls] badges for an hour (#9343) 2023-07-02 10:25:57 +01:00
Pierre-Yves Bigourdan
04a6344efe Mention YouTube API services and link to Google Privacy Policy (#9339) 2023-07-01 11:20:25 +00:00
chris48s
53cce8f1f1 allow negative timestamps in relative [date] badge (#9321)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-26 22:34:20 +00:00
chris48s
08e6933f0e Upgrade to ESLint 8; affects [docker factorio] (#9289)
* upgrade to ESLint 8

* update services to fix camelcase rule errors

---------

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-18 19:47:18 +00:00
chris48s
e7737ce050 remove obsolete travis .org examples (#9284)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-18 12:00:36 +00:00
chris48s
f24b00fecd increase max age on reddit badges (#9282)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-18 11:50:19 +00:00
chris48s
a5f91a40e5 fix a load of spacing issues in frontend content (#9281) 2023-06-18 09:05:42 +01:00
chris48s
50ea7068a8 migrate frontend to docusaurus (#9014)
* delete loads of really important stuff that we definitely need

* v basic MVP smoosh docusaurus PoC into repo

* TODO

* delete more really important stuff

* TODO

* tidyup: use run-s

* don't redirect images used in frontend to raster proxy

* fix routing

* preserve the /endpoint link

* delete the blog (for now)

I would quite like to re-add this at some point
but its not really the top priority thing right now

* content edits

* appease the lint gods

* update danger rules

* remove placeholder

* cypress tests

* dockerhub --> ghcr

* Revert "dockerhub --> ghcr"

This reverts commit ef74cbb26b.

* downgrade lockfile format

* implement defs/BASE_URL

* fix e2e build

* actually fix cypress tests

* always run cypress tests on build

* this never worked

* add command for docusaurus:clear

* delete more code we don't need any more

* update ESLint/prettier config

* delete unsused exports

* documentation updates

* delete a fairly large chunk of our dependency tree

* allow base_url as build arg to Dockerfile

* fixup dockerfile

* work out base url at runtime if not set

doing this at image build time is not the right approach

* remove gatsby monorepo from closebot

* rename HomepageFeatures to homepage-features
2023-06-17 10:59:07 +01:00
jNullj
67d935492d feat: Add author filter option for [GithubCommitActivity] (#9251)
* feat: Add author filter option for CommitActivity

Add a new filter option to [GithubCommitActivity], allowing users to filter the commit activity by a specific author.

To make the filter more explicit, The label display "commits by [author]" for the total amount of commits and "commit activity by [author]" for other intervals when an author filter is selected.

To maintain a clear and organized code structure, The filtered author is added as an argument and not to the shield path.

The request to find the number of commits by the author is made using the REST api rather then the GraphQL api to make it in 1 request rather then 2.

Resolves #9215

* fix: solve eslint errors

* Add tests for [GithubCommitActivity] filter by author

Add tests for the new filter by author feature.

* update [GithubCommitActivity] spec file for new author feat

Add test for new transformAuthorFilter function of GithubCommitActivity added for the author filter feature.

* Fix null string for label of GithubCommitActivity

* Update GithubCommitActivity example

* improve error handeling for GithubCommitActivity

The author filter error handling removed was redundent as it would never execute, there is no way to seperate branch not found from repo not found.

* update depricated functions

PR #9233 replaced errorsMessages with httpErrors.
This commit updates the new changes to stay up to date with that PR

* remove test for nonexisting error

this exception was removed in commit 9e358c8 and is not needed anymore

* Fixed test for commit activity unexisting repo

* Update example for GithubCommitActivity

Picked a user with commits in the repo as an example that would work

* Add test for invalid commit activity branch

Add test for REST API calls in commit activity branch

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
2023-06-15 19:20:16 +01:00
jNullj
35dfd75ef5 Fix: [GithubCommitActivity] invalid branch error handling (#9258)
* Fix error handling of bad branch in [GithubCommitActivity]

When GraphQL response with a bad repo it returns an error indicating the bad repo.
When GraphQL has the currect repo with a bad branch it will null inside the repo object without an error object.
The privouse commits seems to try and use that but due not allowing null in schema it did not work and an error due to bad schema would show insted.

This commit fixes this issue

* Add test for invalid branch in [GithubCommitActivity]

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
2023-06-14 20:53:48 +01:00
chris48s
14892e3943 Implement a pattern for dealing with upstream APIs which are slow on the first hit; affects [endpoint] (#9233)
* allow serviceData to override cacheSeconds with a longer value

* prevent [endpoint] json cacheSeconds property exceeding service default

* allow ShieldsRuntimeError to specify a cacheSeconds property

By default error responses use the cacheLength of
the service class throwing the error.

This allows error to tell the handling layer the maxAge
that should be set on the error badge response.

* add customExceptions param

This

1. allows us to specify custom properties to pass to the exception
   constructor if we throw any of the standard got errors
   e.g: `ETIMEDOUT`, `ECONNRESET`, etc
2. uses a custom `cacheSeconds` property (if set on the exception)
   to set the response maxAge

* customExceptions --> systemErrors

* errorMessages --> httpErrors
2023-06-13 21:08:43 +01:00
Pierre-Yves Bigourdan
2651e5fe87 Delete old deprecated services (#9254)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-12 07:49:20 +00:00
Pierre-Yves Bigourdan
554c01097d Fix [CodeClimate] tests and examples (#9253)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-11 23:41:39 +00:00
chris48s
6593927f23 embiggen youtube cache, again (#9250) 2023-06-09 23:17:27 +01:00
uncenter
00aef7e63a feat: add 'canceled' status to netlify deploy badge (#9240)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-07 09:41:12 +00:00
Christian Clauss
3b7495a985 php-version.js: Fix typos (#9239) 2023-06-07 09:35:04 +00:00
chris48s
bf1bea8b4a increase default cache on youtube badges (#9238) 2023-06-04 19:04:40 +01:00
chris48s
64d3380e1f fix typo in test name (#9216) 2023-05-30 15:03:19 +01:00
Prashant Rawat
a65a86c6bf Add docstrings for validators service (#9197)
* add docstrings for validators service

* Update services/validators.js

---------

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-05-29 20:00:03 +00:00
jNullj
8a11db8265 feat: Add total commits to [GitHubCommitActivity] (#9196)
* feat: Add total commits to GithubCommitActivity

As part of a new feature proposed at issue #6070 added the requested feature.
I also used the conversation at pull request #6081 as a basis for those changes.

This change adds a new interval to the github/commit-activity shield 'total' (t for short).
The interval shows the total commits of the repo since its creation.

* Fix format with prettier

* Label for 'total' interval is now commits

Label change for the 'total' interval from 'commit activity' to 'commits'

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-05-29 19:46:41 +00:00