Commit Graph

134 Commits

Author SHA1 Message Date
Caleb Cartwright
88b3bc72dd docs: add hacktoberfest badges to readme (#5596) 2020-09-24 04:26:04 +00:00
Pierre-Yves B
2c329cdbb3 Update documentation about snapshot tests (#5468) 2020-08-29 21:28:27 +02:00
Pierre-Yves B
1047fd9c7e Remove badgerbadgerbadger from related projects and add poser (#5456) 2020-08-23 19:08:30 +02: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
alex4200
b97fce43c7 Add quickstart section to readme (#5370)
* Update README.md

Added sentence to make it more clear how to select and use a badge to add to a user's github repo.

* Update README.md

* Reformat

Co-authored-by: Pierre-Yves B <PyvesDev@gmail.com>
Co-authored-by: Paul Melnikow <email@paulmelnikow.com>
2020-08-10 22:37:53 -05:00
Pierre-Yves B
3a8528493a Update Node.js versions in README (#5410) 2020-08-09 08:51:34 +02:00
chris48s
dd958efae5 Community/sponsors page (#5155) 2020-06-17 19:11:14 +01: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
chris48s
8dee584f44 update 'operations' section in README (#5156)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-06-02 18:36:28 +00: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
Caleb Cartwright
5a4f705e8f fix [GitHubHacktoberfest] service test (#4299)
* tests: fix hacktoberfest service test

* tests: update message for post-hacktoberfest, add couple unit tests

* chore: lgtm fix

* tests: fix unit test
2019-11-06 04:47:56 -06:00
Caleb Cartwright
5f0253ae5c chore: add hacktoberfest badge :) (#4115) 2019-10-03 08:57:33 -05:00
Jan Keromnes
2f8704f0dc Improve Gitpod automated setup (#3880)
* Gitpod is no longer in Beta

* Automatically open the web preview on start-up in Gitpod

* Accelerate Gitpod start-up with continuously prebuilt workspaces

* Install Prettier VS Code extension in Gitpod
2019-08-29 18:17:03 +00:00
Paul Melnikow
2177eb7546 Docs: Drop .svg extensions (#3787) 2019-07-25 19:39:35 -05:00
chris48s
38cdc0033f adopt JSDoc, eslint-plugin-jsdoc (#3645)
eslint-plugin-jsdoc:
- install eslint-plugin-jsdoc
- config file
- fix lint/style errors

JSDoc:
- add JSDoc as a dev dependency
- get everything rendering nicely with JSDoc
- config, build command + ignores
2019-07-11 20:14:47 +01:00
Marcin Mielnicki
283601423f Redirect an old png badge with a number as a color; test on [static] (#3412)
Fixes https://github.com/badges/shields/issues/3260

Problem happens when a value of a color in an old PNG static badge is a number: http://localhost:8080/my-label/my-message.png?color=1. In this case `color` in `queryParams` is a number. 
0a0b5b3f03/core/server/server.js (L203-L212)

Surprisingly service test listed below is passing currently on master - value `1` is represented in `queryParams` as a String (only in test). 
`services/static-badge/static-badge.tester.js`
```js
t.create('Old static badge with a number as a color')
  .get('/foo/bar.png?color=1', { followRedirect: false })
  .expectStatus(301)
  .expectHeader('Location', '/badge/foo-bar-1.png')
```

Moreover I added some code + description allowing to debug server.
2019-05-08 12:33:43 -04:00
Paul Melnikow
73ed7778fd Automatically reload the server when it changes (#3401)
While working on #2428 I found myself wanting to reload the server frequently. This is working great and reducing my iteration time significantly. I should have tackled this way sooner! 🙊 

I’ve left `verbose` on which seems useful, at least in the short term while we’re tuning the configuration.

Close #2426
2019-05-01 16:39:25 -04:00
Pierre-Yves B
2806eb8a00 Legacy services clean up (#3367)
* Deleted remaining legacy service bits

* Removed badge from README

* Removed no longer needed try/catch

* Deleted refactoring script

* Switched to const

* Reinstated doc

* Ran Prettier
2019-04-27 19:25:01 +01:00
Paul Melnikow
066193c002 Readme: Update node compatibility (#3330) 2019-04-17 15:15:46 -04:00
Paul Melnikow
e3d115cf99 Rename maxAge to cacheSeconds (#3090)
Close #3069
2019-02-23 20:33:38 -05:00
Paul Melnikow
d2861b2438 Switch to npm ci (#3034) 2019-02-18 17:28:09 -06:00
Owen Voke
dd6ee70802 Update from RawGit to local path (#2952) 2019-02-07 12:44:51 -05:00
Paul Melnikow
da5fd26847 Readme: Repair link to logo (#2945) 2019-02-06 19:15:16 -06:00
Paul Melnikow
d8ce045ead Adopt Gatsby (#2906)
While Next.js can handle static sites, we've had a few issues with it, notably a performance hit at runtime and some bugginess around routing and SSR. Gatsby being fully intended for high-performance static sites makes it a great technical fit for the Shields frontend. The `createPages()` API should be a really nice way to add a page for each service family, for example.

This migrates the frontend from Next.js to Gatsby. Gatsby is a powerful tool, which has a bit of downside as there's a lot to dig through. Overall I found configuration easier than Next.js. There are a lot of plugins and for the most part they worked out of the box. The documentation is good.

Links are cleaner now: there is no #. This will break old links though perhaps we could add some redirection to help with that. The only one I’m really concerned about `/#/endpoint`. I’m not sure if folks are deep-linking to the category pages.

There are a lot of enhancements we could add, in order to speed up the site even more. In particular we could think about inlining the SVGs rather than making separate requests for each one.

While Gatsby recommends GraphQL, it's not required. To keep things simple and reduce the learning curve, I did not use it here.

Close #1943 
Fix #2837 Fix #2616
2019-02-06 16:37:55 -05:00
Paul Melnikow
84e5d58d9b Add CLI for debugging badges (#2930)
Often when responding to bug reports it would be helpful to easily run an example failing badge URL. It takes a while to do that, because you have to copy and paste just the right part of the badge URL. This works on `img.shields.io` links as well as partial paths and should make this really easy. 💨
2019-02-05 21:47:30 -05:00
Pierre-Yves B
ea833a83c4 [GitHubCommitActivity] improvements and examples (#2920) 2019-02-04 20:27:52 -05:00
Paul Melnikow
3a7bddbc26 Consolidate service definition schema, removing support for previewUrl (#2895)
This removes `LONG_CACHE` and its descendants, which was a feature that added `?maxAge` to the live preview badges in the frontend. Since they are all static that is no longer needed, as the static badges all have longer cache timeouts regardless.
2019-01-30 18:35:11 -06:00
Jan Keromnes
36956897e9 Make code contributions easier with Gitpod (#2783)
Ref #2772
2019-01-21 11:44:53 -05:00
Paul Melnikow
394a411127 Showcase two of our distinguishing features (#2705) 2019-01-14 18:54:42 -05:00
Paul Melnikow
674d9877ad Add calebcartwright to core team 💥 (#2718) 2019-01-09 15:59:12 -05:00
Maximilian Brandau
ce7bbba028 Use shields instead of open collective badges (#2708) 2019-01-08 17:04:26 -05:00
Paul Melnikow
23ed74e850 Readme: Fix dev setup instructions (#2700) 2019-01-08 14:07:10 -05:00
Paul Melnikow
8c7404a571 Run Prettier on the rest of the things (#2662) 2019-01-07 18:33:17 -05:00
Paul Melnikow
3ffb3ef5b4 Remove support for exampleUrl (#2640) 2019-01-06 08:31:25 -05:00
Paul Melnikow
227aaa04d8 Update maintainer list 🎉🎉🎉 (#2561)
Please join me in welcoming @calebcartwright to the maintainer team!

Caleb has been doing an incredible job rewriting services, among other things, and we're glad to have him on board!
2018-12-22 20:38:08 -05:00
Paul Melnikow
872aede5be Add readme badges to gamify refactoring some more (#2562)
Ref https://github.com/badges/shields/issues/1358#issuecomment-448743020
2018-12-20 15:20:38 -05:00
Paul Melnikow
705d3dba9d Readme: Update badge label (#2372)
I think this better captures the meaning of this badge, especially from an outsider perspective.
2018-11-21 17:05:37 -05:00
Paul Melnikow
ff9cd20821 Coverage cleanup (#2328)
- Stop running daily service tests in the main repo (since they're now handled [over here](https://github.com/badges/daily-tests)
- Add coverage and separate daily tests badges with links to coveralls
- Update our coverage ignores
    - Move scripts, which do not need coverage, into `scripts/`
- Split out coverage test for npm package
- Remove spurious env var

Ref: #1584 #2314
2018-11-17 09:37:09 -05:00
chris48s
b68ac16092 Move NPM package files out of /lib ; affects [resharper nuget myget dub chocolatey github] (#2300)
* move gh-badges files out of /lib

As far as possible, this is just moving files
around and updating paths however there are 2
functional changes in this commit:
- remove use of lib/register-chai-plugins.spec
  in badge-cli.spec.js
- remove use of starRating()
  in text-measurer.spec.js

* update service tests that use colorscheme.json

* split package.json in two

* clean up import

* don't hard-code path

* start a changelog

* put a license file in the package dir

* re-organise documentation 📚

* don't pack test files

* remove favicon from Makefile

* give package its own test command

* link the docs better in README
2018-11-15 18:48:01 +00:00
Marcin Mielnicki
bc4bd79e90 Metrics with Prometheus (#2069)
* Basic process metrics

* Enable Prometheus by an environment variable

* Code formatting

* Documentation for Prometheus metrics

* Link from README to documentation of Prometheus

* Link from README to documentation of Prometheus

* Link from README to documentation of Prometheus

* Separate module for metrics + tests

* Metrics limited by IP

* Metrics are forbidded for all requets by default

* Code refactoring

* allowedIps passed as a string to PrometheusMetrics

* Handle missing config

* METRICS_PROMETHEUS_ALLOWED_IPS added to documentation

* Log info about enabled metrics

* Unused code removed

* package-lock.json updated

* prom-client updated to 11.1.2

* Code refactoring

* Do not read IP address from X-Forwarder-For header
2018-11-04 18:54:43 +01:00
Pierre-Yves B
cc843946d0 Readme examples (#2233) 2018-10-31 13:47:58 +00:00
chris48s
6fc8744bab Give the NPM package some love (#2200)
* define a public interface for NPM package
* move check-node-version to dependencies
* add missing file to package
* update docs
* bump version
* add gh-badges option to issue template
* abstract text measuring from users
* add a DocBlock for BadgeFactory.create()
2018-10-30 18:34:04 +00:00
Marcin Mielnicki
9b5ca7d0ed License's content and filename changed (#2146) 2018-10-05 22:40:46 +01:00
Christian Oliff
863ee4f2e0 HTTPS link to semver.org (#2093) 2018-09-18 16:30:38 +01:00
Sam Lanning
b6ba720fae Add LGTM alerts badge to README (#2035) 2018-09-01 12:33:26 -07:00
chris48s
7136aac89a update contributing guidance (#2019) 2018-08-29 22:36:24 +01:00
Paul Melnikow
c7e28de025 Show test status on master, not latest build (#1859) 2018-08-07 23:27:35 -04:00
Brian Quinlan
c76090ac7f Add a reference to pybadges (#1773) 2018-07-11 23:17:54 -04:00
Marcin Mielnicki
0d5b48bc64 "commits to be deployed" replaced "last deployed" (#1605) 2018-03-30 12:42:10 +02:00
Marcin Mielnicki
fe4ac0bf1c Log errors to Sentry (#1422) 2018-03-24 20:30:51 +01:00