Commit Graph

323 Commits

Author SHA1 Message Date
Paul Melnikow
b82d663a6d Unflake GitHub integration test (#2683)
Hopefully this fixes #2663.
2019-01-07 20:31:26 -05:00
Paul Melnikow
ec9de03b28 Debug GitHub integration test (#2677)
Ref #2663
2019-01-07 18:26:36 -05:00
Maximilian Brandau
00c193a009 Add 4 open collective badges (#2638)
- open collective backers
- open collective sponsors
- open collective backers and sponsors
- open collective members by tier
2019-01-07 13:50:45 -05:00
Caleb Cartwright
ca487ae086 Refactor [SymfonyInsight] to new service model and rename (#2572)
Based on some discussion/feedback here, this PR now contains several changes:

* Renames the `Sensiolabs` badge/service content to `SymfonyInsight` to reflect the rebranding of that product/service
* Refactors the original service to the new service model (using `BaseXmlService`)
* Updates the color scheme of the original/initial badge type (SymfonyInsight Grade) to more closely mirror the colors used by the vendor/service provider
* Adds a new badge type (violation counts/summary) 
* Adds both mocked and live tests (there were none before) for both the grade & violation badges using the new path `symfony/i` as well as a couple tests for the old path `sensiolabs/i` to check for backwards compatibility

Refs #1358
2019-01-07 00:28:45 -05:00
Paul Melnikow
b32f6eab55 Convert some static previews (#2652) 2019-01-06 17:39:27 -05:00
Paul Melnikow
89113eee17 Migrate deprecated staticExample -> staticPreview (#2650) 2019-01-06 17:30:25 -05:00
Paul Melnikow
a614de5fc9 Deprecate [cocoapods] stats badges; split out tests (#2653)
Resolve #2651.
2019-01-06 16:26:38 -05:00
Paul Melnikow
bc0be4f619 Fixes for config update (#2655)
Ref #2626 #2654
2019-01-06 12:23:58 -05:00
Paul Melnikow
fa5309400d PaaS, CI, and production-friendly config (#2626)
This implements the configuration mechanism I described in #2621. The heavy lifting is delegated to [node-config](https://github.com/lorenwest/node-config) with a minor assist from [dotenv](https://github.com/motdotla/dotenv).

`private/secret.json` has been replaced with environment variables and/or `config/local.yml`. See `doc/server-secrets.md`.
2019-01-06 10:42:09 -05:00
Paul Melnikow
3ffb3ef5b4 Remove support for exampleUrl (#2640) 2019-01-06 08:31:25 -05:00
chris48s
566b58acba refactor [bower] service (#2646) 2019-01-06 13:25:12 +00:00
chris48s
f7728cdb3c refactor [bintray] service (#2645) 2019-01-06 13:22:30 +00:00
Paul Melnikow
83044ce325 Update more exampleUrls; style tweaks (#2639) 2019-01-06 08:18:19 -05:00
Caleb Cartwright
85be66bb19 tests: change scrutinizer branch coverage test example (#2641) 2019-01-05 17:39:55 -05:00
Paul Melnikow
c4143b9c23 Convert a bunch of exampleUrls and formats (#2633) 2019-01-05 14:54:34 -05:00
Paul Melnikow
d97a5e4697 Server start time badge [debug] (#2631) 2019-01-04 17:23:30 -05:00
Paul Melnikow
5233a25ddc Remove spurious truthiness checks on serverSecrets (#2634)
`serverSecrets` is always truthy.

Close #2606
2019-01-04 12:49:48 -05:00
Ang YC
f6357da8ee [Date] Relative date badge (#2244)
Close #749
2019-01-04 11:32:38 -05:00
chris48s
d96d8ae193 Document private/secret.json; affects [bower jira] (#2599)
* don't use a libraries.io token for bower integration

The libraries.io docs claim you need to be authenticated
to make any API request: https://libraries.io/api#authentication

In practice we can call https://libraries.io/api/bower/jquery
just fine with no token and based on chucking a load of
requests at it and examining the `x-ratelimit-remaining`
headers you actually seem to get a better limit with no
authentication.

All of our libraries.io badges in `services/librariesio`
seem to have been running fine with no token for some time.


* change jira auth settings to jira_user, jira_pass

All the other services use servicename_user, servicename_pass

This switches JIRA to use that convention by preference
but supports _username and _password for legacy users.


* add docs for server secrets


* add danger rule for server-secrets.md

this rule prompts users to update server-secrets.md
if 'serverSecrets' is in the diff
2019-01-02 20:49:42 +00:00
Paul Melnikow
a9ff282b74 Extend timeout on GitHub integration test (#2618) 2019-01-02 11:24:03 -05:00
Caleb Cartwright
3bbe2482bc Refactor [TeamCity] and add tests (#2601) 2019-01-02 00:19:33 -05:00
Caleb Cartwright
6d1c748453 Fix serverHasBeenUpSinceResourceCached test (#2593)
Fixes #2571 (Really fixed this time 😄) 

I attempted a fix in https://github.com/badges/shields/pull/2590 using fake timers but didn't realize how the timestamps being used in `cache-headers` were being created. This approach uses a dynamically generated `if-modified-since` value that will now be 30 minutes ahead of the server time stamp used in the comparison.
2018-12-25 21:07:31 -05:00
Caleb Cartwright
09ff426cba tests: add fake timers to cache-headers tests (#2590) 2018-12-24 19:10:11 +00:00
chris48s
ec3531bbde refactor [shippable] service (#2576) 2018-12-23 16:28:40 +00:00
Paul Melnikow
5c665a70da Overhaul initialization pattern for server + server tests (#2519)
Because `server.js` was long a monolith, there are a bunch of shims in place to facilitate unit testing. A few of the test suites share port 1111 which means if one of them fails to set up, the port won't be freed and other unrelated tests will fail. Some of the tests which trigger server setup include timeouts which were added to give setup code time to run. In one the test suites, we actually modify `process.argv`, which seems completely gross.

This implements a few changes which improve this:

1. Separate the server from the server startup script, splitting out `lib/server.js`.
2. Inject config into the server and validate the config schema.
3. Inject config into the service test runner.
4. Use `portfinder`, a popular utility for grabbing open ports during testing.
5. Switch more of the setup code from callbacks to async-await.

Overall it leaves everything acting more reliably and looking rather cleaner, if in a few places more verbose.

It also fixes the root cause of #1455, a `setTimeout` in `rate-limit`. Off and on during development of this changeset, Mocha would decide not to exit, and that turned out to be the culprit.

Fix #1455
2018-12-23 11:24:22 -05:00
chris48s
7dac325196 refactor [CPAN] service (#2575) 2018-12-23 15:20:50 +00:00
Paul Melnikow
4a976b52ea Fix import issue with [dynamic] badge (#2578)
Ref https://github.com/badges/shields/pull/2519#issuecomment-449511750
2018-12-23 10:13:04 -05:00
Brendan Abolivier
da5ca7454a Improve [Matrix] badge generation (#2527)
Fixes #2524 

This PR addresses the issues expressed in #2524, in that it:

* checks if a server has advertised a FQDN it can be reached at and if that FQDN hosts Matrix's client APIs
* uses room aliases instead of room IDs, in order to avoid a badge being impossible to generate if the server that created the room leaves it

This includes a breaking change to the badge endpoint.
2018-12-20 17:00:49 -05:00
Caleb Cartwright
2fe61d2c5c Add [Snyk] badges (#2566)
Adds vulnerability badges from Snyk.io, closes #1642 

- [X] Vulnerability badge for GitHub repos
- [x] Vulnerability badge for npm package
2018-12-20 16:28:54 -05:00
Caleb Cartwright
fc41b576f3 Update [Jira] tests to include color validation (#2565)
Augmenting the tests for Jira that were added in #2541 to also validate color scheme
2018-12-20 15:55:15 -05:00
Paul Melnikow
4e5e3c8aee Split up [github] testers (#2560)
- Update github contributors badge for `create-service-tester`.
2018-12-19 17:20:15 -05:00
Paul Melnikow
382af10506 Rewrite [GithubManifest] and [GithubPackageJson] badges (#2470)
Pave the way for #2259 and rewrite #1721 along the way.

Ref: #2320
2018-12-19 16:33:20 -05:00
Caleb Cartwright
6d3798f26f Migrates [Nexus] service to new service model (#2520)
Ports the Nexus service to the new service model. Some related/relevant conversation in #2347 (and closes #2347). Also adds support for authentication which resolves #1699.
2018-12-19 15:45:22 -05:00
Caleb Cartwright
a1150efd25 Migrate [Coverity] to new service model (#2550)
* feat: migrate coverity to new service model
* chore: add coverity ondemand to deprecated services list
2018-12-18 21:19:50 +00:00
Paul Melnikow
b36a9040f3 Add warning banners to legacy services (#2546) 2018-12-18 20:52:17 +00:00
Caleb Cartwright
7d30d86f2b Migrate [Jira] services to new service model (#2541)
Migrates the Jira badge services to the new service model, and also adds tests for those badges. 

I did make one minor changes to the badge labels/messages when the issue or sprint cannot be found. For example: 

With the LegacyService implementation, when an issue was not found the badge would display as 'issue key | inaccessible' such as `KAFKA-2869 | inaccessible` but this changes that behavior to `jira | issue not found`. I personally find this to be a bit more informative of a message, but want to call it out as I know how important backwards compatibility is. However, at first glance I'm also not sure how we'd replicate the old behavior of using the issue key (provided by user as a param) as the badge label when an issue is not found because the API response has a status code of 404 and a different schema than what Joi is expecting/validating. 

Similarly for the sprints, the old format for a sprint not found was `completion | inaccessible` it's now `jira | sprint not found`
2018-12-17 23:30:33 -05:00
Dean Davidson
b0fbe5f76f Refactor [AzureDevOpsCoverage AzureDevOpsTests] to only report on completed builds; test all [azuredevops] (#2549)
This is in response to [this conversation](https://github.com/badges/shields/issues/2237#issuecomment-446812796). The change turned out being even easier than I had anticipated because the [API supports a buildStatus filter](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-5.0#buildstatus). I did quite a bit of local testing to make sure this is solid. I also ran tests and checked coverage.
2018-12-17 23:12:52 -05:00
Caleb Cartwright
6c9fc0de79 Migrate [Codetally] to new service model (#2548) 2018-12-17 23:07:21 -05:00
Caleb Cartwright
09e8c587d9 feat: migrate sourcegraph to new service model and fix tests (#2535) 2018-12-16 22:05:02 +00:00
chris48s
b5ac5d6044 [dynamicyaml f-droid] add yaml base service class (#2540) 2018-12-16 20:29:20 +00:00
chris48s
e5cacbc73f refactor [CRAN] service (#2538) 2018-12-16 19:25:27 +00:00
Caleb Cartwright
dea35025b1 Deprecate [nsp] service (#2529)
deprecated nsp service and added doc for deprecation
2018-12-16 19:21:22 +00:00
Paul Melnikow
5e50b7bcc4 Fix [npm] badges when a dependency points to a URL (#2525)
Fix #2523
2018-12-13 14:07:33 -05:00
Paul Melnikow
b8461aa921 Rewrite [DynamicXml] and [DynamicYaml] badges (#2487)
- A little related cleanup in `server.js`: remove a couple import renames.
2018-12-12 16:52:47 -05:00
Paul Melnikow
a3a52524fc Add [npm] badges for collaborator count and dependency version (#2461)
This adds a badge for collaborator count. When evaluating a library, it can be useful to know that there's not a single-contributor bottleneck for publishing. Having more than one collaborator is a sign of library maturity.

It adds another badge for dependency version of published dependencies, which solves a similar problem as the node-version badge. I will find this useful for making sure dependencies are up to date in a library.
2018-12-12 15:02:37 -05:00
Paul Melnikow
38ca6fc396 Add quality category and sort a couple other badges [scrutinizer] (#2483)
Ref #1905
2018-12-12 14:59:46 -05:00
Pierre-Yves B
029a14681d Improved [MicroBadger] tests speed (#2512) 2018-12-12 19:19:45 +00:00
Paul Melnikow
88c8b0ee3e More example urls and static examples [apm waffle] (#2478) 2018-12-11 16:31:01 -05:00
Caleb Cartwright
d74568b9c9 Minor test updates for jenkins coverage and token-pool (#2509) 2018-12-11 21:10:21 +00:00
Caleb Cartwright
43faea4561 Add new service for CII Best Practices badges [CIIBestPractices] (#2477) 2018-12-11 19:20:51 +00:00