Commit Graph

22 Commits

Author SHA1 Message Date
Hrishikesh Patil
1e6acc830b [GitlabCoverage] Add badge for code coverage (#5262)
* Add base for GitLab code coverage badge

* Change examples to repos which have implemented code coverage reporting
in GitLab UI

* Add tests for Gitlab Coverage badge

* Fix test data that was not changed

* Update code according to new branch detection

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Update docs and examples, make branch required option that was missed in
previous commit

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Apply suggestions from PR discussion

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Remove default value of branch param

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Apply further discussed changes to service

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Fix tests that were failing

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Add fetch and transform functions

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Add examples and tests for custom job name

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Add finishing touches

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

* Change to a working example

Signed-off-by: Hrishikesh Patil <hrishikeshpatil.754@gmail.com>

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-08-07 00:15:47 +00:00
chris48s
810efb14f9 Make branch a required param on bb/gitlab/travis-php (#5318) 2020-07-15 21:00:43 +01:00
chris48s
13d75e0607 upgrade to prettier 2 (#5051)
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00
Caleb Cartwright
34d4271509 tests: fix Gitlab service tests (#5049)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-05-04 14:10:34 +00:00
Caleb Cartwright
18d63aec6e tests: fix gitlab pipeline status service test (#4301) 2019-11-05 20:59:59 -06:00
Michael Schmitz
f82f7b798d [gitlab] Add documentation for publicity state of pipelines (#4218)
* Add documentation for publicity state of pipelines

* Modify visual picture to be smaller and add red circle to mark important setting

* Adapt suggestion

Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2019-10-20 12:14:55 -05: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
chris48s
8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
Pierre-Yves B
1f29c22d3d Migrated most service tests to use new expectBadge (#3122) 2019-02-28 21:43:23 +00: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
4bd16f93e8 Sort imports and requires (#3056)
This will definitely save time, and ensure more uniformity.

It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter.

Closes #2701
2019-02-21 22:14:40 -05:00
Paul Melnikow
2d7be31b0c Validate query params in BaseService (#3042)
This is a mid-sized PR that adds query param validation to BaseService and updates most of the services which use query param validation to use it. There are a couple minor tweaks I made along the way.

Fix #2676
2019-02-20 22:24:47 -05:00
Caleb Cartwright
855c9cd261 Remove dev dep imports in production code (#2937)
Fixes #2876 with @paulmelnikow's suggestion 

Moved imports of `ServiceTester` and `createServiceTester` to a separate file so that dev dependencies are not imported by service classes.
2019-02-05 21:51:55 -05:00
Paul Melnikow
226fa67a02 Create shortcut for BaseService-related imports (#2809)
Continue to implement #2698:

- Add `core/base-service/index.js` (but hold off on moving the things it imports)
- Add shortcuts in `services/index.js` for Base*Service, errors, and deprecatedService. This file will be streamlined later to avoid cluttering it with rarely used bits.
- Apply consistent ordering of imports and use of `module.exports` in testers.
- Remove some renaming of imports.
- Remove obsolete tests here and there.
2019-01-21 15:41:24 -05:00
Pierre-Yves B
55ce947a35 Extended usage of build-status.js tomore services (#2763)
* Extended usage of build-status.js

* Removed remaining status arguments
2019-01-15 20:27:18 +00:00
chris48s
796d066930 remove asterisks from examples (#2749) 2019-01-13 12:17:39 +00:00
Paul Melnikow
d1c5378bf0 Integrate new path-to-regexp with trailing optionals (#2644)
Fix #2497

Ref pillarjs/path-to-regexp#176
2019-01-08 18:50:47 -05:00
Paul Melnikow
89113eee17 Migrate deprecated staticExample -> staticPreview (#2650) 2019-01-06 17:30:25 -05:00
Paul Melnikow
8a8311d931 Unify and minimize tester boilerplate (#2472)
I started using this one-line boilerplate a while back and it seems to tidy things up a bit.
2018-12-08 13:15:24 -05:00
Paul Melnikow
6a737b7b38 Rewrite the DynamicJson badge (#2399)
This starts the rewrite of the dynamic badges. I've pulled into BaseService an initial version of the query param validation from #2325.

I've extended from BaseJsonService to avoid duplicating the deserialization logic, though it means there is a bit of duplicated code among the three dynamic services. The way to unravel this would be to move the logic from `_requestJson` and friends from the base classes into functions so DynamicJson can inherit from BaseDynamic. Would that be worth it?

This introduces a regression of #1446 for this badge.

Close #2345
2018-12-06 16:45:40 -05:00
Paul Melnikow
809ecf73b9 Examples: Drop deprecated aliases query, urlPattern (#2443) 2018-12-03 16:30:12 -05:00
Paul Melnikow
282520041d Add [GitlabPipeline] badge (#2325)
There's a lot of demand for the Gitlab badges (#541) and the PR has been lingering, so I thought I'd start off one of the simple ones as a new-style service. This one is SVG-based, so it shouldn't require the API-token logic which could use some more testing and will require us to create an app and configure it on our server.

We don't have any validation in place for `queryParams`. Probably this should be added to BaseService, though for the time being I extracted a helper function.

Thanks to @LVMBDV for getting this work started in #1838!
2018-11-18 10:06:47 -05:00