Commit Graph

121 Commits

Author SHA1 Message Date
Thaddée Tyl
ea405e04e6 Default to not logging GitHub token debugging (#1364)
As argued for in
https://github.com/badges/shields/issues/1314#issuecomment-350564524.

It populates large quantities of text in the logs, where I wish to only
see errors.
2017-12-10 13:02:03 -05:00
Krutov Alexander
b1ca6391d0 Add MicroBadger (#1340) 2017-12-07 17:30:42 -05:00
Peter Gribanov
962cf61b82 PHP version from .travis.yml (#1258)
Reference: #819
2017-12-06 11:04:24 -05:00
mattbk
2028251ca0 Add [Liberapay] (#1251) 2017-12-05 23:01:02 -05:00
Paul Melnikow
7c1b1fc621 Fix style picker in markup modal (#1331)
- Restore correct list of styles to markup modal
- DRY lists of styles

Fix #1330
2017-12-05 18:08:13 -05:00
Eric Berry
3581efe5e1 Add [Discourse] status/stats shield (#1326)
Close #1325
2017-12-05 17:34:59 -05:00
Marcin Mielnicki
0570a9e920 License badge colour corresponding to license type (#1190) 2017-12-05 16:43:29 -05:00
tooomm
f700502c4f webpage: add missing titles + more badge previews (#1305) 2017-12-05 11:17:46 -05:00
Paul Melnikow
9882a44e56 Configure for deployment with zeit now (#1308)
I'm experimenting with Zeit Now as another hosting option. These changes enable a working deployment.
2017-12-04 18:25:16 -05:00
Paul Melnikow
1d313bdd19 Github admin endpoint: use basic auth password instead of username (#1317) 2017-12-03 15:07:58 -05:00
Thaddee Tyl
9cb9113a34 Add endpoint to obtain logs
It goes through a WebSocket; the secret is sent, and if valid, the logs
are sent back.
2017-12-03 18:48:31 +01:00
Thaddee Tyl
e61373e739 Add system endpoint to fetch network information
This is part of an effort to set up an admin monitoring platform.
2017-12-03 18:48:31 +01:00
chris48s
56b82e1665 [pypi] Add badge for django version support (#1286)
Closes #1018
2017-12-01 16:10:34 -05:00
Paul Melnikow
6f632224c1 Fix some example and preview URLs 2017-12-01 09:42:19 -05:00
Pyves
bf13792633 Optimisation of makeBadge key width computation (#1298)
* Added cache to text width for badge keys.
2017-11-30 22:25:08 -05:00
Paul Melnikow
af0799a312 Use template strings in make-badge (#1296)
c.f. https://github.com/badges/shields/pull/1167#discussion_r145313407
2017-11-30 17:16:08 -05:00
Paul Melnikow
127b46aef8 Github auth admin endpoint and logging (#1267)
- Periodically log github auth information
    - Tokens are hashed which reduces the security risk inherent in the logs
        - A consistent hash is used so tokens can be correlated across the three data structures and across the three servers
- Add an admin endpoint for github auth information
    - Tokens are returned as-is to enable troubleshooting (e.g. comparing our reqRemaining to github’s)
2017-11-30 13:21:27 -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
1af1f497bb Allow configuring allowed CORS origins for suggest (#1282)
- Support single-server testing and a local dev server (like Next) that is on a different port from the shields server
- Refactor config schema

With this change, the suggestions work locally in #1273.
2017-11-25 18:27:02 -05:00
Danial
a4bce73da6 For-the-badge | Convert labels to string then uppercase (#1281) 2017-11-22 23:35:33 -05:00
Vladimir Starkov
e588bef199 Support custom npm registry URLs (#1277) 2017-11-20 19:22:42 -05:00
Paul Melnikow
d91b904b82 Redirect the root only when configured (#1270)
- Fix `’INFOSITE' is not recognized` in `npm start` on Windows

Close #1259
2017-11-17 13:42:38 -06:00
Pyves
7039e68018 Consistent version formatting (#1246)
Provide greater consistency for badges related to versions. Fix #1181.

- the `version` function in `color-formatters` was previously returning the colour of the badge, but also its text with a leading _v_. It was broken down into two separate functions and the text formatting part was moved to `text-formatters`, where it really belongs.

- unit tests were added for these two functions in `color-formatters.spec` and `text-formatters.spec`, using Sazerac.

- as discussed in #1181, the leading _v_ was omitted  for _xxxx-yy-zz_ date patterns. Any future exceptions can easily be added to the `ignoredVersionPatterns` pattern.

- the badge colour was previously switched to orange if a hyphen was found in the version string. This didn't seem ideal, instead pattern matching is done to find keywords such as `beta`, `alpha` or `snapshot`. Of course, this list can easily be extended.

- all badges related to versions now use the `versionText` and `versionColor` functions. There are a few rare exceptions, for instance in cases where the data returned by the service's API allows to figure things out without relying on any parsing/pattern matching (eg. `badgeData.colorscheme = prerelease ? 'orange' : 'blue';`, where `prerelease` is determined from an API's response).
2017-11-11 17:54:38 -05:00
Danial
8c2de04d99 [sonar] support new SonarQube api (#1239)
* update sonarqube

* parse value as int

* Add tests

* Update example & Add depreciated API example

* eslint

* tidyup & depreciated -> legacy
2017-11-12 09:26:15 +13:00
rnons
178376ddf0 add [elm-package] badge 2017-11-11 14:17:30 -05:00
Thaddee Tyl
59c0662874 Fix bug saving GitHub tokens from other servers
This fixes a bug introduced in 076cb14, wherein we discarded tokens received
from other servers, and wherein we could save tokens with invalid
identification.

The bug was raised by Paul Melnikow.
2017-11-11 10:27:24 +01:00
Paul Melnikow
8733a8b8f2 Use GitHub token rotation in production :P (#1266) 2017-11-10 13:51:39 -05:00
Peter Gribanov
0d3d33bf1b Get PHP version from [Packagist] (#1256) 2017-11-10 12:46:52 -05:00
Tyler Nickerson
632c70b6b5 Added support for new Code Climate scores (#1236) 2017-11-06 18:53:40 -05:00
Tatsuya Saito
6788a31ed5 Adds new badge for [Redmine] plugin rating (#1247) 2017-11-06 10:59:26 -05:00
Paul Melnikow
4d22799962 Fix Github base url again
Fix #1243.
2017-11-02 10:35:22 -04:00
Paul Melnikow
7ca2e97155 Use sazerac for our data-driven tests (#1228)
Sazerac is a library for data-driven tests, where a series of tests asserts that the return value of a function matches the expected value. It provides nice syntax for tightening this up.

https://hackernoon.com/sazerac-data-driven-testing-for-javascript-e3408ac29d8c

This converts our tests to use it, and replaces some similar home-grown code.

I fixed one bug I encountered along the way: mikec/sazerac#12.
2017-11-01 20:15:19 -04:00
Paul Melnikow
7eb9bb5209 Promisify svg2img 2017-10-31 23:13:23 -04:00
Paul Melnikow
550012a09c Fix a couple badge examples 2017-10-31 23:12:50 -04:00
freezy
ad4a8b4406 [bitrise] Added new build service Bitrise.io (#1227)
Close #574.
2017-10-31 13:23:33 -04:00
Paul Melnikow
37fbef5504 Clean up the outer scope of server.js (#1235) 2017-10-31 13:21:43 -04:00
Paul Melnikow
b458faee1a Change makeBadge() to a synchronous function 2017-10-31 00:10:45 -04:00
Paul Melnikow
a54338afa8 Rename badge() -> makeBadge() (#1232) 2017-10-30 22:08:33 -04:00
Paul Melnikow
91eaa2958c Move gh-badges CLI into lib/ 2017-10-30 21:46:50 -04:00
Paul Melnikow
b16122d9a4 When a global gh_token is configured, always use it (#1118)
If I configure a global gh_token, I expect it to be used all the time. I expect to see predictable failures when that token is exhausted.
2017-10-29 22:36:39 -04:00
Paul Melnikow
090454a828 Cache keys should not be the same (#1223)
Fix the cache bug introduced in #1186 that blocked today's deploy.
2017-10-29 22:11:10 -04:00
Paul Melnikow
9d84d2fec1 Fix Sourcegraph preview URI 2017-10-29 21:29:22 -04:00
Paul Melnikow
3c37dbd3dc [maven-metadata] Add support for maven-metadata.xml (#1214)
Based on ArsenArsen's work in #953.
2017-10-28 15:12:44 -04:00
freezy
cf14ab1464 Added Funding category 2017-10-28 11:07:35 -04:00
Kieran Hunt
d9860991ed Fix style issue with iTunes App Store on homepage (#1211)
References:
- https://en.wikipedia.org/wiki/ITunes
- https://www.apple.com/itunes/
2017-10-28 08:03:55 +13:00
Marcin Mielnicki
f89b317542 Latest tag with any prefix + tests (#1188) 2017-10-26 16:31:13 -04:00
Pyves
ffb6fdb884 [eclipse-marketplace] New last updated Eclipse badge (#1204)
Implement a fifth Eclipse Marketplace badge, which displays the "date" when the plugin was last updated on the marketplace.
2017-10-25 22:23:22 -04:00
Paul Melnikow
446d4ce21e Correct cache behavior for custom query parameters (#1186)
I developed this for #820 to provide the correct cache behavior when a service wants to use custom parameters from the query string.

For safety, only the declared parameters (and the global parameters) are provided to the service. Consequently, failure to declare a parameter results in the parameter not working at all (undesirable, but easy to debug) rather than indeterminate behavior that depends on the cache state (undesirable, but hard to debug).
2017-10-24 23:00:23 -04:00
Tesla Ice Zhang
f7cecf7eda Add JetBrains plugin version to the front page (#1197) 2017-10-21 12:06:41 -04:00
Paul Melnikow
6aae294b28 Avoid errors when offline 2017-10-21 11:29:30 -04:00