Commit Graph

14 Commits

Author SHA1 Message Date
chris48s
e8157100b8 migrate examples to openApi part 11: enums; affects [codefactor conda depfu homebrew jsdelivr reddit sourceforge testspace vaadin github] (#9437)
* WIP enums

* WIP moar enums

* add a helper function for extracting enum from route pattern

* add enum schemas to services

* review and improve service names

* convert some more services with enums

* review and improve service names

* fix issue/pull request detail
2023-08-30 16:14:18 +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
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
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
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
chris48s
bb5614df70 minor [reddit] improvements (#7436)
* apply colour scheme to reddit karma badge

* accept negative metric in reddit karma tests

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-12-29 18:26:44 +00:00
Rohit Sah
8a1c69ead6 Fixed Reddit Negative Karma Issue (#6992) 2021-09-07 19:49:02 +01:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
Thakur Karthik
2fa69ba359 Refactor readthedocs reddit redmine repology services (#5641)
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-10-03 15:10:16 +00:00
chris48s
504015c0ba migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
Joe Izzard
36e1d30631 [Reddit] New badge and additional testing (#5166)
* fix: added detection of private subs and aded a test

* test: added test for no subscriber info

* feat: added user-karma badge

* refactor: changed class name for testing

Changed the class name to allow testing the whole service with 'reddit'

* refactor: refactored code for code and output style

* refactor: change how variables are passed to be cleaner

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-06-09 02:15:07 +00:00
dependabot-preview[bot]
294aa1e1df Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0; autofixes (#3671)
* Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0

Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.3 to 2.18.0.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.3...v2.18.0)

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

* Autofixes
2019-07-08 12:13:46 -04:00
chris48s
8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
Josep Bernad
d685cde52b Add [Subreddit] subscribers (#3443)
* Add subreddit subscribers service file.

* Fix small detail in service and add the tests files.

* Apply suggested changes by the reviewer.

* Trying to make tests work.

* Update services/reddit/subreddit-subscribers.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/reddit/subreddit-subscribers.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Apply suggested changes.

* Add different handler for non existing and invalid subreddits.

* Update services/reddit/subreddit-subscribers.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2019-05-22 16:43:13 -05:00