Commit Graph

160 Commits

Author SHA1 Message Date
Pierre-Yves B
68fb0b7bab Run on node 14 in production, drop node 10 support for badge-maker and update test matrix (#6652) 2021-06-21 20:46:55 +01:00
Caleb Cartwright
956f2e0584 update simple-icons to v5 with by-name lookup backwards compatibility (#6591)
* deps: update simple-icons to v5 in BC manner

* fix: handling of overlapping titles

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-06-12 19:51:28 +00:00
Pierre-Yves B
9c7baa26ab Deprecate [Bintray] service (#6423) 2021-04-24 18:05:59 +01:00
Pierre-Yves B
8ef8b76d8d Delete outdated rewriting-services.md (#6391) 2021-04-19 21:41:48 +01:00
Pierre-Yves B
dfb92961c1 Delete outdated users.md (#6390) 2021-04-19 21:34:50 +01:00
chris48s
4c52b0192a Upgrade to gatsby 3 (#6331)
* upgrade all the gatsby packages

* require npm >=7 to prevent lockfile churn

* get everything onto a version of safe-buffer with typescript defs

* update docs
2021-03-28 20:08:19 +01:00
Pierre-Yves B
f1dc5b27f1 Update number of badges served each month (#6278)
* Update number of badges served each month

* Use less precise numbering in releases documentation
2021-03-18 14:18:34 +00:00
Caleb Cartwright
9a91499d37 Add docs for all types of releases (#6210)
* docs: add info on all releases

* docs: incorporate feedback and discussion items

* docs: fix another typo
2021-03-15 07:44:01 +00:00
chris48s
2d3b845adc refresh self-hosting docs (#6273) 2021-03-14 18:55:56 +00:00
Caleb Cartwright
806c52bdd6 Update Contributing documentation on PRs/service tests & amending history (#6128)
* docs: update contributing info on PRs/tests & amending history

* docs: include git config links

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-02-02 00:54:23 +00:00
Cobertos / Samantha
7a1eee06a2 Update self-hosting.md documentation for running with Prometheus (#6052)
* Update documentation for running with Prometheus

There's two environment variables that need to be set in order to use Prometheus and the /metrics endpoint.

* Missing s

* Update doc/self-hosting.md

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-01-16 17:54:43 +00:00
Paul Melnikow
46b98c40be Remove the in-memory cache (#6037)
Shields has long had an in-memory cache with some complex logic for determining when the cached values are used and when they are flushed. At the time this was implemented, squeezing cache performance was helpful since there was no downstream cache. For years now we've used Cloudflare as a CDN, so trying to cache onboard is less useful than before. Furthermore, since the cache is very small and only used in fairly restrictive ways, it probably has very little impact on performance.
2021-01-11 15:53:36 -05:00
chris48s
0d95612bcf add note to docs about img.shields.io vs shields.io (#6039)
* there are now fewer bottlenecks

* add note to docs about img.shields.io vs shields.io
2021-01-10 20:40:44 +00:00
chris48s
e54e69cf8e add docs on input validation (#6009)
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2021-01-04 19:32:32 +00:00
chris48s
6ccd24815f remove refs to netlify from docs (#5978)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-12-23 23:22:22 +00:00
chris48s
0be2ee0aa7 post-Heroku migration cleanup tasks (#5886)
* remove 'commits to be deployed' badge

* remove old deploy scripts

* update prod hosting docs

* remove 'commit is/isn't in gh-pages' action

* remove OVH servers from docs

* clarify role of CloudFlare DNS

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-12-01 19:48:20 +00:00
Pierre-Yves B
c73b92f188 Drop .env support (#5864) 2020-11-23 21:20:55 +00:00
Pierre-Yves B
796dc5a25b Remove documentation about old OVH VPS servers (#5863) 2020-11-22 18:54:02 +00:00
Hubert Jagodziński
b9d5da66fd Update service-tests.md (#5706)
* Update service-tests.md

Added information `expectBadge()` accepts a RegExp.

* Run prettier
2020-10-15 19:19:46 +00:00
Paul Melnikow
1fab1a7140 When configured, require requests to come from Cloudflare (#5666)
This is the code part of #3027, following [this article](https://www.viget.com/articles/heroku-cloudflare-the-right-way/) and using [this middleware](https://github.com/clive-io/cloudflare-middleware).

I pulled in the `addHandlerAtIndex()` function @chris48s wrote for #5574.

The middleware isn't perfect for scoutcamp, since it relies on `req.ip` which is something set by Express. However, the other solutions I found were either explicitly deprecated ([cloudflare-ip](https://www.npmjs.com/package/cloudflare-ip)) or relied on dynamically fetching the list of Cloudflare hosts ([cloudflare-ips](https://www.npmjs.com/package/cloudflare-ips)), which seems unnecessary as this list has not changed in several years.

I've left this off to start, so we can test it in production using an env var before we make it the production default.
2020-10-12 12:36:42 -04:00
JeongHoon Byun (a.k.a Outsider)
dc32a5fc4b Fix wrong anchor for writing tests document (#5677) 2020-10-10 05:14:52 +00:00
Paul Melnikow
e1ac63d3be Finish removing server-secrets.js (#5664)
I’ve tested locally that setting `gh_token` still conditionally enables `ConditionalGithubAuthV3Service`.

Closes #3393
2020-10-07 17:29:03 -04: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
Paul Melnikow
7c226456fe Adopt static fields in [amo] and core (#5440)
Since we've upgraded production to Node 12 (#5436) we can finally adopt static fields!

This starts the process by updating core and one of the service families.
2020-08-19 14:49:29 -04:00
chris48s
0bcd7eef15 Run on node 12 in production, update test matrix (#5436)
* upgrade node/npm versions in package.json

* delete config for zeit now
zeit now is no more, vercel have decomissioned the now v1 platform

* upgrade to node 12 for (docker) self-hosting users

* update docs

* update test matrix
run tests on node 12 and node 14

* link to nodejs version support docs in package comment
we'll continue to tun the package tests on node 10
while its still maintained and drop in the next
major release

* update depcheck

* remove npm-install job
2020-08-18 19:28:58 +01:00
Pierre-Yves B
135b842946 Migrate [Discord] implementation to use bot token (#5346)
* Migrate [Discord] implementation to use bot token

* Rework authorization field creation

* Revert "Rework authorization field creation"

This reverts commit caf65bde5d.

* Add LGTM exclusion for hardcoded credentials
2020-07-24 18:04:12 +02:00
Paul Melnikow
8fa61ae164 Update Cloudflare access + remove OAuth app (#5295) 2020-07-08 19:12:22 -04:00
Paul Melnikow
778b146d8e Update list of who has access to production resources (#5192)
This action item was requested at the ops team meeting.

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-06-14 20:09:04 +00:00
Pierre-Yves B
0fd557d7bb Implement [YouTube] badge (#5132)
* Implement [YouTube] badge

* Update production-hosting.md with account owner

* Add votes badge variant

* Add links to tests

* Switch to social badge style
2020-06-10 18:44:21 +02:00
Joe Izzard
56ae094afb doc: fixed the link to badge URL spec (#5164)
Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
2020-06-04 19:12:13 +02:00
chris48s
13d75e0607 upgrade to prettier 2 (#5051)
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00
chris48s
171aac3c42 update production hosting/deploy docs (#5013) 2020-05-03 16:00:37 +01:00
chris48s
612a43aaa9 Update test matrix and docs (#4992)
* update test matrix

* update docs
2020-04-30 21:33:59 +01:00
chris48s
3ba05cb184 📦 version 3 (#4756)
* Validate input to BadgeFactory.create() (#3875)

* validate input to create()

* remove deprecated properties (#3881)

* remove BadgeFactory class (#3884)

* Template literal templates (#4459)

- Remove use of the doT template library and move to generating SVG output using javascript template literals.
- Drop SVGO and mostly manually implement the optimisations.
- Add a bunch more tests

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>

* drop raster support in package CLI (#4523)

* drop raster support in package CLI
* update docs

* rename gh-badges package to badge-maker

* rename gh-badges dir to badge-maker

* update relative imports and other refs to in parent dir

'gh-badges' --> 'badge-maker'

* update snyk service tests

This change is only tangentially related

We've used the shields repo as an example for these tests so
moving files around in our repo has a knock-on effect on them

* add missing type hints to dev style page

* write the changelog/migration guide for v3

* use extension in README CLI example

* update CLI help

whoops - missed this in #4523

* bump version

* update for self-hosting users

* README updates

* drop .format param from CLI, always output SVG

* Change text[] to label and message, Remove JSON output

- Change text[] to label and message
- Fix message only badge
- Remove JSON output format
- Update the docs

* update package-lock

* rename 'template' to 'style'

* handle invalid styles in coalesceBadge

* ensure makeBadge is passed a string for template in coalesceBadge()

issue #4925

* fix (logo/no label text/label color specified) case

issue #4926

* add example of (logo/no label text/label color specified) to style debug page

* update type defs

* padding fix for FTB style

Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
2020-04-23 20:05:48 +01:00
Joschua Becker
b2bb50234f updating node js version (#4879)
Node.js 8.x LTS Carbon is no longer actively supported!

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-04-08 19:30:26 +00:00
Pierre-Yves B
097bf87e41 Make it easier to benchmark and profile the code (#4780)
* Make it easier to benchmark and profile the code

* Remove unnecessary escape

* Clarify that the backend server is started without the frontend

* Add missing NODE_CONFIG_ENV environment variable

* Add error message when user has not included console.time statements

* Fix lint issue

* Handle multiple console.time statements

* Switch NODE_CONFIG_ENV to test

* Switch to const as variable never re-assigned
2020-03-22 20:45:53 +01:00
chris48s
d8831729cb Check request origin before sending credentials (#4729)
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2020-03-04 20:42:27 +00:00
Marcin Mielnicki
0dce98b022 Typo fix (#4563) 2020-01-20 22:27:43 +01:00
chris48s
e879682e29 Add documentation for designing badge URLs (#4435)
* Add documentation for designing badge URLs
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2019-12-22 17:05:00 +00:00
Paul Melnikow
4d1bec20e2 Tutorial: Update the method order to be canonical (#4267) 2019-10-30 21:57:01 -04:00
Hubert Jagodziński
b7f3f175a5 Tutorial fixes (#4229) 2019-10-24 13:22:29 +02:00
Kamontat Chantrachirathumrong
2119a01953 fix invalid link (#4152) 2019-10-10 08:37:21 -05:00
Pierre-Yves B
157a6180b2 Make search work with category names (#4103) 2019-10-02 20:03:59 +01:00
Pierre-Yves B
a3786ce327 Add Twitch and Wheelmap OAuth app owners (#4039)
* Add Twitch and Wheelmap OAuth app owners

* Update doc/production-hosting.md

Co-Authored-By: Paul Melnikow <github@paulmelnikow.com>
2019-09-18 16:55:59 +00:00
Andy Li
4b9053d2d5 add [twitch] user status badge (#3683)
* add /twitch/status/:user badge

* update comments

* use a proper schema for the Twitch API calls

* use a token to make Twitch api calls

* fix handling of rate-limit error and bad token error

* [twitch] get a token as soon as creating a Twitch service

* [twitch] start both requests to users and stream before awaiting

* [twitch] set a timeout to replace the token before it expires

* [twitch] use authHelper

* [twitch] skip tests when no credentials

* [twitch] add one more status test

* twitch: do not check whether a user exists
2019-09-09 16:41:32 -05:00
chris48s
60bd7a69a7 link to contributing.shields.io in the docs (#3957)
* link to shields-docs.netlify.com in the docs

* update links to contributing.shields.io
2019-09-09 20:37:43 +00:00
Paul Melnikow
2177eb7546 Docs: Drop .svg extensions (#3787) 2019-07-25 19:39:35 -05:00
Paul Melnikow
cfbd2c30df SVG by default (#3717)
Make cleaner badge URLs by omitting the `.svg` extension.

Closes #2674
2019-07-24 12:57:39 -05:00
Paul Melnikow
6cbc7b587a Document the production Redis hosting (#3710)
Close #3332
2019-07-13 08:39:07 -05:00
Paul Melnikow
aa135d370f Auto-annotate live and mock tests (#3661)
Close #2555
2019-07-07 17:06:01 -04:00