Commit Graph

113 Commits

Author SHA1 Message Date
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
Paul Melnikow
ea4b758612 Move service tests alongside code (#1563)
Per discussion in #1543
2018-03-20 18:32:48 -07:00
Paul Melnikow
e37668b392 We have no more pull requests to adopt (#1587)
We’ve cleared the backlog of pull requests needing adoption and closed the old ones out, so it seems best to remove this from the contributing guidelines.
2018-03-19 20:27:47 -04:00
Paul Melnikow
7d90391b05 Housekeeping after upgrade to Node 8 (#1564) 2018-03-18 13:34:15 -04:00
Paul Melnikow
ae848f38f4 Add snapshot tests for SVG and JSON (#1557)
These tests should fail if something is accidentally changed that affects the SVG or JSON files. In the case of deliberate changes, we can update the snapshots.
2018-03-11 09:07:03 -07:00
Danial
49574df0d1 [README.md] add logos (#1507) 2018-03-03 20:14:04 -05:00
Paul Melnikow
81560cb0c6 Set up CircleCI (including [github] tests) (#1338)
I don’t like that our build goes red on master all the time due to flaky service tests. I thought I’d look into other CI services that would make it possible to run the scheduled tests nightly without causing those messages to show up.

CircleCI, Heroku CI, and Codeship were obvious choices. Heroku CI wasn’t free and I didn’t have any experience with Codeship, so I looked into CircleCI. I’ve used their 1.0 system a lot though this was my first time on their 2.0 system. As with earlier versions, they’ve put a lot of work into making the build fast – perhaps more than any other CI system I’ve seen.

I had such good results, my goal shifted from scheduled daily builds (that don’t litter our commit history with red builds) to improving the CI experience as a whole.

This change made a big impact:

- Build logs load much, much faster. In the test I just ran, 22 seconds to < 2 seconds, a 90% improvement.
- Status of each step shows up right in the GitHub UI, which makes it much faster to see exactly what’s failed.
- Builds run about 50-75% faster on account of parallelism.
- GitHub service tests are fixed. This has been a long-standing issue.
- Ability to ssh into a build container to debug failures.

Here’s what I did:

- Created custom Docker images with our dependencies. To be honest, I’m not even sure these are necessary, only to install the greenkeeper-lockfile. We could get dejavu from npm. They make startup very fast.
- Created an npm-install stage which loads all dependencies into node_modules and caches them.
- Created separate stages for our main tests, service tests, and frontend tests, and stages to run the main tests and service tests in Node 6. These run in parallel, up to four at a time.
- Separated service test ID output from the service test results themselves. (I check these often during the PR process, when I confirm that service tests actually ran. Because the production Shields server caches the title, after updating it you can’t tell whether the update is taking effect.)
- Added a personal access token for the shields-ci user. This should actually fix the long-standing issue #979. CircleCI provides an option to “Pass secrets to builds from forked pull requests,” which means unlike Travis, they’ll give us enough rope to shoot ourselves in the foot.
- Schedule a daily build, which runs all the service tests.
2017-12-06 15:45:09 -05:00
Paul Melnikow
342e71ee65 Update docs re production builds (#1316) 2017-12-04 19:08:48 -05:00
Paul Melnikow
ce2ca922b2 Readme: Fix logo link
For #1301
2017-12-01 09:28:21 -05:00
tooomm
cda9dd35a1 readme: fix link (#1300)
- fixed link to github contributors from Open Collective template
- adjusted brackets around [contribute] to match style for backers and sponsors
2017-12-01 09:10:37 -05:00
Paul Melnikow
8fa751d0c5 Activating Open Collective (#1295)
See comments in #1250. Gratipay is shutting down.
2017-11-30 14:19:50 -05:00
Paul Melnikow
4b5bf03fea Rewrite frontend in React (#1273)
I rewrote the frontend in React using a module bundler. It's matched feature-for-feature with the current frontend, with only slight changes in the styling. I did not fuss about making the styling identical; the badge popup looks particularly different.

This makes the front end much easier to develop. I'm really looking forward to implementing #701, to which this paves the way.

This makes light use of Next.js, which provides webpack config and dev/build tooling. We’ll probably replace it with create-react-app or our own webpack setup because unfortunately it comes with a lot of runtime overhead (the build is 400k).

Let’s open new issues for bugs and features, and track other follow-ups here: https://github.com/badges/shields/projects/1
2017-11-28 11:34:17 -05:00
Paul Melnikow
a2f5cbb03a Push frontend to production servers at /index.html (#1222)
* Push frontend to production servers at /index.html

Local production builds will use local server instead of img.shields.io, to support local testing

* Restore https://img.shields.io to example URIs
2017-11-01 20:48:01 +01:00
Paul Melnikow
bde4d925f2 Retire try.html and create new dev + prod builds (#1194)
- Followup from #1163
- Retire try.html
- Separate build config for dev and production
    - Move config for badge examples into the JS build
- Move the prod transform into npm scripts
    - In the future this could be handled using a bundler plugin
- make website builds production build as before
- Run the production build in CI to make sure it’s working
- Build the frontend on Heroku
2017-10-28 14:02:45 -04:00
Paul Melnikow
748f80b438 Add new maintainer and update history
Based on info in https://github.com/badges/shields/pull/1129#discussion_r144972746
2017-10-18 15:10:21 -04:00
Marcin Mielnicki
f371c8fb07 On [Github] issues badge, add quotes around multi-word labels (#1178)
- Fix an alt name in readme
2017-10-17 18:11:27 -04:00
Paul Melnikow
5fbdc5e773 Docs: Cosmetic, link fixes, and copyedits (#1176) 2017-10-14 15:01:45 -04:00
Paul Melnikow
16045fdff8 Update documentation (#1129)
I wrote a new readme and contributing guidelines, and took a rough pass through the rest of the documentation.
2017-10-14 11:43:52 -04:00
Igor Šarčević
bce78921c8 Changing 'semaphoreapp.com' to 'semaphoreci.com' 2017-09-10 15:45:11 -07:00
Daniel Lo Nigro
896b2aab2f Add Discord badge to README 2017-05-01 14:30:44 -04:00
Michael Howell
3dd0f96f77 Add docs.rs as a standard-compliant service
![mio on docs.rs](https://docs.rs/mio/badge.svg)
2017-03-27 17:05:17 -04:00
Thaddee Tyl
4d937d859a Fix readme logo path 2017-02-16 23:19:33 +01:00