Commit Graph

2914 Commits

Author SHA1 Message Date
chris48s
4908bc5b1a refactor [microbadger] service (#3143)
* refactor [microbadger] service

* account for missing size key
2019-03-06 09:37:24 +00:00
Paul Melnikow
4f411755da Add a stats category for static badges (#3168)
Right now they're showing up in "other," though I expect they make up
most of that category.

https://github.com/badges/shields/issues/966#issuecomment-469851361
2019-03-05 21:23:20 -06:00
Paul Melnikow
e159d90516 Reorganize a couple of the legacy helpers [npm node jenkinsplugin dynamic] (#3163) 2019-03-05 20:43:33 -06:00
Paul Melnikow
a801450dd6 Move deprecation helpers to services/ (#3162)
This is currently unused, though it seems fine to keep it around.
2019-03-05 20:32:41 -06:00
dependabot[bot]
0941b6c39c Bump gatsby-plugin-catch-links from 2.0.11 to 2.0.12 (#3151)
Bumps [gatsby-plugin-catch-links](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-catch-links) from 2.0.11 to 2.0.12.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-catch-links/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/gatsby-plugin-catch-links@2.0.12/packages/gatsby-plugin-catch-links)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-05 20:21:35 +00:00
dependabot[bot]
39d5fceaba Bump camelcase from 5.0.0 to 5.2.0 (#3166)
Bumps [camelcase](https://github.com/sindresorhus/camelcase) from 5.0.0 to 5.2.0.
- [Release notes](https://github.com/sindresorhus/camelcase/releases)
- [Commits](https://github.com/sindresorhus/camelcase/compare/v5.0.0...v5.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-05 20:06:57 +00:00
dependabot[bot]
767626fbd5 Bump gatsby from 2.1.17 to 2.1.19 (#3153)
Bumps [gatsby](https://github.com/gatsbyjs/gatsby) from 2.1.17 to 2.1.19.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.1.17...gatsby@2.1.19)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-05 20:01:03 +00:00
Paul Melnikow
b7d632c6eb Make [AmoDownloads] test more reliable (#3159)
Close #3156
2019-03-04 23:52:27 -05:00
dependabot[bot]
136e174e35 Bump @babel/plugin-proposal-object-rest-spread from 7.3.2 to 7.3.4 (#3150)
Bumps [@babel/plugin-proposal-object-rest-spread](https://github.com/babel/babel) from 7.3.2 to 7.3.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.3.2...v7.3.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 23:37:24 -05:00
dependabot[bot]
ce4e3281ea Bump @babel/core from 7.3.3 to 7.3.4 (#3146)
Bumps [@babel/core](https://github.com/babel/babel) from 7.3.3 to 7.3.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.3.3...v7.3.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 23:33:14 -05:00
dependabot[bot]
4907cea8f5 Bump js-yaml from 3.12.1 to 3.12.2 (#3154)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.1 to 3.12.2.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.1...3.12.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 23:28:31 -05:00
dependabot[bot]
5021bdd21d Bump sinon from 7.2.4 to 7.2.6 (#3148)
Bumps [sinon](https://github.com/sinonjs/sinon) from 7.2.4 to 7.2.6.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v7.2.4...v7.2.6)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 23:10:06 -05:00
Caleb Cartwright
c52ea44450 fix: GH followers example style (#3158) 2019-03-04 23:07:13 -05:00
Caleb Cartwright
33786fa891 refactor [GitHubFollowers] (#3157) 2019-03-04 22:49:55 -05:00
Ludovic Fernandez
df56ca81e2 feat: [DockerCloud] and automated. (#3139)
* feat: docker cloud build and automated.

* refactor: better title.

* refactor: better badge URL.

* refactor: applies review comments.

* Update services/docker/docker-cloud-common-fetch.js

Co-Authored-By: ldez <ldez@users.noreply.github.com>

* refactor: encode query parameters.
2019-03-04 20:05:50 -06:00
Matthew Ratzke
85658250b6 update [clojars] endpoint (#3128)
* refactor(sourceforge): ref. sourceforge and add folder test (#3127)

doc: updated tutorial links and code snippets (#3124)

Refactor [Coveralls] (#3130)

* refactor(coveralls)

* chore: added comment with link to api

* doc: updated coveralls api doc comment

* doc: updated coveralls api doc comment

update clojars endpoint

Updates clojars badge to use api endpoints

Added release endpoint which returns latest stable release

Updates version endpoint which will now also return snapshots if available or latest stable release

check for invalid version and update variable send to render

import InvalidResponse

update require

make pretty

switch to prettyMessage

remove metadata lines

initial base class

initial base class

update schema

update ClojarsDownloads base class

simplify version classes

remove transform from export

update schema

remove unused var

replace == with ===

remove extra line

fix versionColor ?

fix lint error

make pretty

refactor transform

refactor transform and update tests

add error messagest to download service

fix error messages

remove errorSchema, revert changes to tests

refactor schema

update ClojarsDownloads base class

simplify version classes

remove transform from export

remove unused var

fix lint error

make pretty

refactor transform and update tests

add error messagest to download service

fix error messages

remove errorSchema, revert changes to tests

refactor schema

* fix versionColor

* remove errorMessages

* change prettyMessge to string

* update service names and add api docs reference

* update shields url

* update service names for clarity

* rename service files for clarity

* remove transform

* remove InvalidResponse
2019-03-04 19:50:05 -06:00
Caleb Cartwright
f4b66062b4 Refactor [buildkite] (#3126) 2019-03-04 19:55:13 -05:00
dependabot[bot]
ec24efd2b1 Bump query-string from 6.2.0 to 6.3.0 (#3145)
Bumps [query-string](https://github.com/sindresorhus/query-string) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/sindresorhus/query-string/releases)
- [Commits](https://github.com/sindresorhus/query-string/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 19:52:01 -05:00
Caleb Cartwright
879581466c Refactor [Codeship] (#3131) 2019-03-04 19:41:57 -05:00
dependabot[bot]
839d7c5825 Bump jsonpath from 1.0.0 to 1.0.1 (#3152)
Bumps [jsonpath](https://github.com/dchester/jsonpath) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/dchester/jsonpath/releases)
- [Commits](https://github.com/dchester/jsonpath/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-04 19:39:17 -05:00
Caleb Cartwright
726830f067 Add ability to transform query params in redirct service, run [Endpoint GitHubReleaseRedirect SensioLabs VSO] (#3125)
* feat(redirector): added transformQueryParams to redirector

* refactor: renamed to transformPath in redirector

* Rename targetUrl to targetPath

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

* feat(redirector): handle param conflicts
2019-03-04 18:11:37 -06:00
Paul Melnikow
c7deb5a0d1 First adoption of React hooks (#3096)
I did this as a warm-up to using [React hooks](https://reactjs.org/docs/hooks-intro.html), which provide a better way to accomplish stateful things and side effects using functional components. This allows all components to be written in the same style, improves testability, facilitates code reuse, etc.

There's [a intro here](https://reactjs.org/docs/hooks-intro.html) which links to [Dan's talk at React Conf](https://www.youtube.com/watch?time_continue=3599&v=dpw9EHDh2bM) which does a really good job of explaining why hooks are a good way to write components. He describes hooks as being the electrons and neutrons to components which are atoms. Low-level functionality which was always there in React, though not as accessibly or visibly.

This adds a lint rule that enforces "the rule of hooks" which says they have to be declared at the top level in the functional component.

I don't think this changeset does a fabulous job of showing off the improvements hooks allows, though I think it is still a good direction for this code.
2019-03-03 18:30:20 -05:00
Caleb Cartwright
1a6b32b49a Refactor [david] (#3135) 2019-03-03 20:19:27 +00:00
Caleb Cartwright
c009f3cf51 Refactor [continuousphp] (#3134) 2019-03-03 19:54:15 +00:00
chris48s
711c3044dc add schema for [bugzilla] service (#3142) 2019-03-03 19:46:25 +00:00
Caleb Cartwright
cc0f1fc6db Refactor [bundlephobia] (#3132) 2019-03-03 19:00:52 +00:00
Pierre-Yves B
eb453401e3 Updated remaining documentation (#3141) 2019-03-03 10:42:14 -06:00
Pierre-Yves B
96dfa5b085 Allowed expectBadge to be called with null color (#3137) 2019-03-02 23:26:10 +00:00
Caleb Cartwright
f6e061f150 Refactor [GitHubWatchers] (#3136) 2019-03-02 22:19:11 +00:00
Caleb Cartwright
cad3ea434f Refactor [Coveralls] (#3130)
* refactor(coveralls)

* chore: added comment with link to api

* doc: updated coveralls api doc comment

* doc: updated coveralls api doc comment
2019-03-02 10:48:38 +00:00
Caleb Cartwright
f0eac60191 doc: updated tutorial links and code snippets (#3124) 2019-03-01 16:00:18 -06:00
Caleb Cartwright
ee97de13f3 refactor(sourceforge): ref. sourceforge and add folder test (#3127) 2019-03-01 21:56:34 +00:00
Paul Melnikow
56e71d7c76 Label all deprecated services as such (#3120)
* Label all deprecated services as such

This will change

service_requests_total{category="other",family="cocoapods",service="cocoapods_apps"} 76

to

service_requests_total{category="other",family="cocoapods",service="deprecated_cocoapods_apps"} 76

* Fix tests
2019-02-28 18:22:28 -06:00
Paul Melnikow
97358c1399 Rewrite [GitHubStars] (#3119)
* Refactor [GithubStars]

* Add test of link array
2019-02-28 18:18:32 -06:00
Henry Poydar
513b69272e Update instructions for self-hosting Shields with Heroku (#3123) 2019-02-28 18:13:44 -06:00
Pierre-Yves B
1f29c22d3d Migrated most service tests to use new expectBadge (#3122) 2019-02-28 21:43:23 +00:00
XhmikosR
4e2d144f97 Fix footer links (#3121)
Fix discord footer link and remove trailing slash from repo URL
2019-02-28 11:55:38 -05:00
Paul Melnikow
b43c9c7c18 Refactor [bitrise] (#3117) 2019-02-27 23:21:11 -05:00
Paul Melnikow
fafb22efee Move "good" badge helpers from lib/ to services/ (#3101)
This moves a few helpers from `lib/` to `services/`:

build-status.js
build-status.spec.js
color-formatters.js
color-formatters.spec.js
contributor-count.js
licenses.js
licenses.spec.js
php-version.js
php-version.spec.js
text-formatters.js
text-formatters.spec.js
version.js
version.spec.js

And one from `lib/` to `core/`:

unhandled-rejection.spec.js

The diff is long, but the changes are straightforward.

Ref #2832
2019-02-27 20:47:46 -05:00
Paul Melnikow
8b2ecaefd1 Remove Heroku buildpack config; allow devDependencies to be pruned (#3115)
The buildpack config doesn't seem to be needed. This would affect review apps, staging, and self-hosting.

Also, devDependencies are installed by default during the build: https://devcenter.heroku.com/changelog-items/1376

By removing `NPM_CONFIG_PRODUCTION=false` we allow these to be pruned so they're kept out of the slug. This also has the advantage of creating a test environment in PRs where missing production dependencies will cause things to break. That'd be a good thing!
2019-02-27 19:08:19 -05:00
Paul Melnikow
dfc95ddd1a Add per-badge metrics for BaseService (#3093)
This picks up #2068 by adding per-badge stats as discussed in #966.

It ensures every service has a unique `name` property. By default this comes from the class name, and is overridden in all the various places where the class names are duplicated. (Some of those don't seem that useful, like the various download interval services, though those need to be refactored down into a single service anyway.) Tests enforce the names are unique. These are the names used by the service-test runner, so it's a good idea to make them unique anyway. (It was sort of strange before that you had to specify `nuget` instead of e.g. `resharper`.)

I've added validation to `deprecatedService` and `redirector`, and required that every `route` has a `base`, even if it's an empty string.

The name is used to generate unique metric labels, generating metrics like these:

```
service_requests_total{category="activity",family="eclipse-marketplace",service="eclipse_marketplace_update"} 2
service_requests_total{category="activity",family="npm",service="npm_collaborators"} 3
service_requests_total{category="activity",family="steam",service="steam_file_release_date"} 2
service_requests_total{category="analysis",family="ansible",service="ansible_galaxy_content_quality_score"} 2
service_requests_total{category="analysis",family="cii-best-practices",service="cii_best_practices_service"} 4
service_requests_total{category="analysis",family="cocoapods",service="cocoapods_docs"} 2
service_requests_total{category="analysis",family="codacy",service="codacy_grade"} 3
service_requests_total{category="analysis",family="coverity",service="coverity_scan"} 2
service_requests_total{category="analysis",family="coverity",service="deprecated_coverity_ondemand"} 2
service_requests_total{category="analysis",family="dependabot",service="dependabot_semver_compatibility"} 3
service_requests_total{category="analysis",family="lgtm",service="lgtm_alerts"} 2
service_requests_total{category="analysis",family="lgtm",service="lgtm_grade"} 3
service_requests_total{category="analysis",family="snyk",service="snyk_vulnerability_git_hub"} 4
service_requests_total{category="analysis",family="snyk",service="snyk_vulnerability_npm"} 5
service_requests_total{category="analysis",family="symfony",service="sensiolabs_i_redirector"} 1
service_requests_total{category="analysis",family="symfony",service="symfony_insight_grade"} 1
service_requests_total{category="build",family="appveyor",service="app_veyor_ci"} 3
service_requests_total{category="build",family="appveyor",service="app_veyor_tests"} 6
service_requests_total{category="build",family="azure-devops",service="azure_dev_ops_build"} 6
service_requests_total{category="build",family="azure-devops",service="azure_dev_ops_release"} 5
service_requests_total{category="build",family="azure-devops",service="azure_dev_ops_tests"} 6
service_requests_total{category="build",family="azure-devops",service="vso_build_redirector"} 2
service_requests_total{category="build",family="azure-devops",service="vso_release_redirector"} 1
service_requests_total{category="build",family="bitbucket",service="bitbucket_pipelines"} 5
service_requests_total{category="build",family="circleci",service="circle_ci"} 5
```

This is predicated on being able to use Prometheus's [`rate()`](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate) function to visualize a counter's rate of change, as mentioned at https://github.com/badges/shields/issues/2068#issuecomment-466696561. Otherwise the stats will be disrupted every time a server restarts.

The metrics only appear on new-style services.
2019-02-27 18:58:59 -05:00
dependabot[bot]
62a89fc834 Bump react from 16.8.2 to 16.8.3 (#3102)
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.8.2 to 16.8.3.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.8.3/packages/react)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-27 18:42:09 -05:00
dependabot[bot]
c050fc976f Bump babel-preset-gatsby from 0.1.7 to 0.1.8 (#3106)
Bumps babel-preset-gatsby from 0.1.7 to 0.1.8.

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-27 18:25:50 -05:00
dependabot[bot]
f3804a0764 Bump gatsby-plugin-page-creator from 2.0.7 to 2.0.8 (#3108)
Bumps gatsby-plugin-page-creator from 2.0.7 to 2.0.8.

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-27 18:22:32 -05:00
dependabot[bot]
94b150195e Bump mocha-env-reporter from 3.0.0 to 4.0.0 (#3078)
Bumps [mocha-env-reporter](https://github.com/wix/mocha-env-reporter) from 3.0.0 to 4.0.0.
- [Release notes](https://github.com/wix/mocha-env-reporter/releases)
- [Commits](https://github.com/wix/mocha-env-reporter/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-02-27 18:19:51 -05:00
Paul Melnikow
73d8156f44 Convert some format regexes to patterns (#3109) 2019-02-27 17:52:20 -05:00
Pierre-Yves B
81fbd4ed49 Introduced expectBadge helper (#3097) 2019-02-27 08:02:14 +00:00
Paul Melnikow
e4fe8c0c5f Rewrite [GithubSearch] (#3099) 2019-02-25 15:24:41 -05:00
chris48s
92039e413d add notes to logo docs about brand guidelines (#3088) 2019-02-25 20:02:07 +00:00
chris48s
c6ea546fab use caret for all gh-badges dependencies (#3110) 2019-02-25 19:56:24 +00:00