Commit Graph

729 Commits

Author SHA1 Message Date
Duane O'Brien
ad7023bcbe Make the osslifecycle badge company-agnostic (#3618)
* Make the osslifecycle badge company-agnostic 

Removes references to Netflix in the example titles of the osslifecycle badge
To make the badge more generic and easier to use by companies besides Netflix, the examples should remove Netflix from the title.

* Adding Netflix back in as a keyword, to make the badge easily searchable for people who remember it with the old title.
2019-07-11 19:08:43 +01:00
Chintalagiri Shashank
a9d0f0d323 Updates *GPL licenses to new SPDX ids and adds additional aliases, run service tests for [apm aur bowerlicense cocoapodslicense cpanlicense cran crates ctan dublicense eclipsemarketplacelicense githublicense hexpm npmlicense packagistlicense pypilicense] (#3686)
* Updated GPL, LGPL, and AGPL licence IDs to the SPEX 3.5 specification.

* Add GPL, LGPL, and AGPL aliases in the format in which they are used in Python classifiers.
2019-07-10 15:38:00 -05:00
Paul Melnikow
ce0ddf93fc Inject secrets into the services (#3652)
This is a reworking of #3410 based on some feedback @calebcartwright left on that PR.

The goals of injecting the secrets are threefold:

1. Simplify testing
2. Be consistent with all of the other config (which is injected)
3. Encapsulate the sensitive auth-related code in one place so it can be studied and tested thoroughly

- Rather than add more code to BaseService to handle authorization logic, it delegates that to an AuthHelper class.
- When the server starts, it fetches the credentials from `config` and injects them into `BaseService.register()` which passes them to `invoke()`.
- In `invoke()` the service's auth configuration is checked (`static get auth()`, much like `static get route()`).
- If the auth config is present, an AuthHelper instance is created and attached to the new instance.
- Then within the service, the password, basic auth config, or bearer authentication can be accessed via e.g. `this.authHelper.basicAuth` and passed to `this._requestJson()` and friends.
- Everything is being done very explicitly, so it should be very clear where and how the configured secrets are being used.
- Testing different configurations of services can now be done by injecting the config into `invoke()` in `.spec` files instead of mocking global state in the service tests as was done before. See the new Jira spec files for a good example of this.

Ref #3393
2019-07-09 23:14:36 -04:00
Pierre-Yves B
8c4cb41b6d New [Gerrit] badge (#3667) 2019-07-08 19:21:57 +01:00
Paul Melnikow
738d4c78bc Ensure Joi is imported as @hapi/joi [cirrus] (#3681)
* Ensure Joi is imported as @hapi/joi [cirrus]

I noticed this import failed in #3675. Maybe we've finally dropped the last copy of the old joi?

* Ignore dangerfile
2019-07-08 13:09:31 -04:00
dependabot-preview[bot]
294aa1e1df Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0; autofixes (#3671)
* Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0

Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.3 to 2.18.0.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.3...v2.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Autofixes
2019-07-08 12:13:46 -04:00
Paul Melnikow
aa135d370f Auto-annotate live and mock tests (#3661)
Close #2555
2019-07-07 17:06:01 -04:00
Paul Melnikow
9b3db0774b Deprecate shields-server.com domain (#3666)
Now that these s0.server.shields.io entries are set up through the main DNS on Cloudflare, we don't need the shields-server.com domain anymore. One less thing to maintain.
2019-07-07 16:37:42 -04:00
Paul Melnikow
9b6a51b61e Convert a format to pattern in [githubpackagejson] (#3660)
This now relies on the order in which these are registered, though that seems okay. Exporting them as an array guarantees that.

Ref #3329
2019-07-07 12:41:30 -04:00
Paul Melnikow
9346548850 Refactor [BitbucketPullRequest] (#3649)
This encapsulates the fetch methods slightly better. Cherry-picked from #3410, which needs to be reworked. This change should simplify dropping in the new auth method when that happens.
2019-07-05 17:40:43 -04:00
Paul Melnikow
c817e69775 Minor refactor in [azuredevopstests] (#3651)
Cherry-picked from #3410; should simplify reworking it.
2019-07-05 16:52:17 -04:00
Pierre-Yves B
77b4551716 Support other [Bugzilla] instances (#3633) 2019-07-04 22:57:51 +01:00
Caleb Cartwright
ea865436a1 add [Sonar] badges for various test metrics (#3571)
* feat: add SonarTests badges

* chore: remove commented out line

* refactor: update SonarTestsSummary to override transform
2019-07-01 15:46:51 -05:00
Paul Melnikow
0f19806c58 Bump nock from 11.0.0.beta-14 to 11.0.0.beta-20 (#3616)
* Bump icedfrisby and icedfrisby-nock

* Bump nock from 11.0.0.beta-14 to 11.0.0.beta-20

Hoping the changes from #3615 will fix the issues that appeared at https://github.com/badges/shields/pull/3552#issuecomment-504610847

* Fix apm tests

* Fix githubcommitstatus
2019-06-28 15:50:17 -04:00
Caleb Cartwright
c312eae3e3 feat: add CodeFactor grade badge (#3588) 2019-06-22 09:13:34 -05:00
dependabot-preview[bot]
95b6e48bff Build(deps-dev): bump nock from 11.0.0-beta.14 to 11.0.0-beta.19 (#3552)
* Build(deps-dev): bump nock from 11.0.0-beta.14 to 11.0.0-beta.19

Bumps [nock](https://github.com/nock/nock) from 11.0.0-beta.14 to 11.0.0-beta.19.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/beta/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix one test

* Update for breaking change in nock api

* Always use got without retries in tests
2019-06-21 10:45:34 -04:00
Caleb Cartwright
fe76a55e2c tests: fix some jenkins service tests (#3590) 2019-06-20 08:59:55 -04:00
dependabot-preview[bot]
d732b937c9 Build(deps-dev): bump prettier from 1.17.1 to 1.18.2 (#3580)
* Build(deps-dev): bump prettier from 1.17.1 to 1.18.2

Bumps [prettier](https://github.com/prettier/prettier) from 1.17.1 to 1.18.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.17.1...1.18.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* chore: prettier
2019-06-17 19:15:44 -05:00
Caleb Cartwright
c9917c0176 feat: add scoped package support for jsdeliver npm hits (#3570) 2019-06-16 19:21:48 +01:00
Caleb Cartwright
6fb6cfaa40 tests: fix Azure DevOps build test (#3569) 2019-06-16 19:16:37 +01:00
Reece Dunham
0808a70d6d Added [Cirrus] CI badge support (#3502)
* add base (needs tweaking)

* more work

* updates / more work

* fix minor thing

* handle

* add test

* Fix

* get rid of svg scraper

* Fixed Cirrus badge

Use JSON endpoint

* Rename cirrus.test.js to cirrus.tester.js

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update cirrus.service.js

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/cirrus/cirrus.service.js

Co-Authored-By: Fedor Korotkov <fedor.korotkov@gmail.com>
2019-06-15 14:30:47 -05:00
chris48s
703371dd78 fix [wordpress] /v redirect (closes #3564) (#3565) 2019-06-13 16:48:38 +01:00
Caleb Cartwright
d37caea7aa fix(BitbucketIssues): switch to v2 API from deprecated v1 API (#3563) 2019-06-12 17:27:17 -05:00
Caleb Cartwright
c80cc0c4fd tests: fix EclipseMarketplaceLicense test (#3542) 2019-06-10 09:54:10 -05:00
Caleb Cartwright
15b8e62739 chore: fix hapi import in jitpackdownloads (#3543) 2019-06-10 09:39:25 -05:00
Caleb Cartwright
3fec21a028 restore [JitpackDownloads] badge (#3533)
* feat: restore JitpackDownloads badge

* chore: use interval name in jitpackdownloads
2019-06-09 16:44:44 -05:00
Pierre-Yves B
e9f24af878 EPL-2.0 license (#3539) 2019-06-09 18:14:01 +01:00
严尚君
c2c8fb6d7f add gitee (#3531)
add gitee
2019-06-08 12:45:36 -05:00
Axel Huebl
6cdb2a6b98 Spack Package Manager: Latest Version (#3536)
Add support for the Spack package manager (https://spack.io).
Spack is a modern multi-language, multi-variant software package
manager in high-performance computing (HPC).
2019-06-08 17:12:50 +01:00
Corebreaker
76e8d8e05f Allow nulls for boolean fields on Libraries.io APIs (#3530) 2019-06-05 18:14:23 -05:00
chris48s
8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
Caleb Cartwright
054b2eb5ba fix: circle token query param bug (#3516) 2019-06-02 12:31:59 -04:00
James Cahill
a2641ac5e3 Add [Mastodon] service (#3508)
* add mastodon follow service

* Use nonNegativeInteger for followers_count

* Add documentation
2019-05-31 11:38:36 -05:00
chris48s
bfe0bde83d switch [powershellgallery] platform example (#3504)
The example we were previously using
(Az.Storage) now renders

platform | not specified

This replaces the example with a
package that gives us a valid result
2019-05-29 21:21:35 +01:00
chris48s
65dba94fa8 Stop calling variables "which"; affects [chocolatey codeclimate conda crates debug gem github mozillaobservatory nuget powershellgallery pub resharper vaadindirectory] (#3495)
* which --> variant

* which --> alias

* which --> format

* improve param names in codeclimate

* improve param names in github-issue-detail

* update github-issue-detail unit tests
2019-05-28 23:00:12 +01:00
Caleb Cartwright
b7982f4459 feat: deprecate jitpack downloads badge (#3493) 2019-05-27 16:21:50 -05:00
Caleb Cartwright
27bb914172 tests(jsdelivr): increase timeout (#3479) 2019-05-24 13:31:35 +01:00
Caleb Cartwright
37030b92a0 tests(GitHubReleaseDate): fix service tests (#3477) 2019-05-23 19:31:49 +01:00
Josep Bernad
d685cde52b Add [Subreddit] subscribers (#3443)
* Add subreddit subscribers service file.

* Fix small detail in service and add the tests files.

* Apply suggested changes by the reviewer.

* Trying to make tests work.

* Update services/reddit/subreddit-subscribers.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Update services/reddit/subreddit-subscribers.tester.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Apply suggested changes.

* Add different handler for non existing and invalid subreddits.

* Update services/reddit/subreddit-subscribers.service.js

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2019-05-22 16:43:13 -05:00
Caleb Cartwright
02ee34d2a5 feat: deprecate waffle service (#3473) 2019-05-22 10:04:30 +01:00
Caleb Cartwright
f94efe74db fix(aur): update test and example package targets (#3475) 2019-05-22 09:57:15 +01:00
Pierre-Yves B
570ba18333 lastCompletedBuild for [Jenkins] badges and better discoverability (#3460) 2019-05-16 21:29:16 +01:00
Caleb Cartwright
9fe238a81f fix(stackexchange): questions/month badge with 0 questions (#3456) 2019-05-13 20:41:56 -04:00
Pierre-Yves B
992bd81baa Fixed Wordpress rating examples (#3445) 2019-05-12 22:12:47 +01:00
chris48s
7caf301730 switch [circleci] service to scrape SVG badge, reorganise routes (#3413)
* switch [circleci] service to scrape SVG badge

* reorganise [circleci] routes

Default URL is now
circleci/build/gh/badges/shields/master?token=abc123
There are redirects on the legacy routes to provide
backwards compatibility for existing users
2019-05-11 17:55:32 +01:00
chris48s
3bb614ff39 fix [microbadger] examples (#3439) 2019-05-09 16:39:40 -04: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
7afb26ef14 Add some aliases for license colors; refactor; test colors for [PypiLicense] (#3431)
This covers some of the license strings used by the PyPI badges like **BSD** which currently shows up in lightgrey.
2019-05-07 23:32:15 -04:00
Jeffrey Paul
9b3fd375bb Update references to "WordPress" (#3434)
Fixes #3432
2019-05-07 11:39:00 -04:00
Chris Gavin
d6c875c519 Fix [LGTM] badges for non-GitHub projects. (#3362)
* Fix LGTM badges for non-GitHub projects.

* Allow using full repository host names in LGTM badge URLs.

* Add an LGTM redirector service to redirect old LGTM badge URLs to new LGTM badge URLs.

* Add LGTM redirector tester.

* Remove unneeded check in LGTM base file.

Co-Authored-By: chrisgavin <chris@chrisgavin.me>
2019-05-07 07:46:14 -07:00