Commit Graph

51 Commits

Author SHA1 Message Date
guoxudong
05ab8a0bd7 feat: add [GitlabLanguageCount] service (#8377)
* feat: add gitlab language count service

* fix testr

* fix

Signed-off-by: guoxudong <guoxd@jihulab.com>

Signed-off-by: guoxudong <guoxd@jihulab.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-07 20:49:07 -05:00
Paula Barszcz
2260126064 [GitLabCoverage] subgroup bug (#8401) 2022-09-28 21:08:45 +01:00
guoxudong
a73026faa9 feat: add [gitlab]-helper for encapsulate docs and err (#8295)
* feat: add gitlab-helper for encapsulate docs and err

* update merge requests

* fix mr example

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-09-04 22:32:23 +00:00
guoxudong
e95189c180 feat: add [gitlabmergerequests] service (#8166)
* fix

* fix

* add unit test

* fixes based on review

* fix spec test

* fix info

* fix mr example

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-17 01:31:23 +00:00
guoxudong
af47032cb5 feat: add [GitlabStars] service (#8209)
* feat: add gitlab stars service

* add test case

* fix

* fix link

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-08 21:18:35 +00:00
guoxudong
202d72d365 feat: add [GitlabForks] server (#8208)
* feat: add gitlab forks server

* add test case

* fix

* fix test

* link message to /forks

Co-authored-by: chris48s <chris.shaw480@gmail.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-07-28 21:05:54 +00:00
guoxudong
e9c08512ce feat: add [gitlabissues] service (#8108)
* feat: add gitlab issues service

* fixes based on review

* fixes based on review

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-07-04 22:38:05 +00:00
chris48s
076ee25bfb moar fixes for [gitlab] auth (#8162)
* fix auth in gitlab contributors badge

* fix gitlab auth for badges that use fetchPaginatedArrayData()

* add a test covering fetchPaginatedArrayData auth

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-07-02 20:57:36 +00:00
Caleb Cartwright
3c6ca5d59c fix [gitlab] auth (#8145)
* fix(gitlab): use oauth header, add private repo test

* tests(gitlab): fix nock header match on unit test
2022-07-01 16:42:09 -05:00
chris48s
0ceb558bb4 change routes for [gitlab] license and contributors badges (#8140) 2022-06-30 20:56:05 +01:00
guoxudong
bb81467f9a style: unified self-managed gitlab instance name (#8105) 2022-06-18 14:00:53 +00:00
guoxudong
b9c63ec687 feat: add [gitlab] contributors service (#8084)
* feat: add gitlab contributors service

* add validate and test case

* fix base on review

* remove 2 test case

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-06-17 19:56:04 +00:00
guoxudong
00e9f2dfaa fix: gitlab licence service docs and example (#8083)
* fix: fix gitlab licence service docs and example

* Update services/gitlab/gitlab-license.service.js

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-06-14 16:10:16 -05:00
guoxudong
2d7d8c5b78 fix(gitlab service test): fix gitlab pipeline & tag(nested group) service test, run [gitlabtag gitlabpipeline] (#8076)
* fix(gitlab service test): fix gitlab pipeline & tag(nested group) service test

* rm .tool-verdions file
2022-06-13 23:35:00 +00:00
guoxudong
781aedc353 Add [gitlablicense] services (#8024)
* feat(gitlab): add gitlab licience services

* fix

* update based on review

* rm .tool-verdions file

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-06-12 00:55:04 +00:00
Pierre-Yves Bigourdan
530e1b5fe4 Fix [GitlabCoverage] self-hosted test and example (#7548) 2022-01-29 22:07:18 +01:00
Caleb Cartwright
567dce6367 tests: fix GitLab Tag service test (#7322)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-12-04 17:15:18 +00:00
chris48s
c73072deed Remove requestOptions2GotOptions compatibility layer (#7270)
* gzip --> decompress

* strictSSL --> https.rejectUnauthorized

* auth --> username/password

* qs --> searchParams

* fix base service auth docs

* completely remove requestOptions2GotOptions layer

* update the docs

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-11-15 19:56:08 +00:00
dependabot[bot]
9f322f55f6 chore(deps-dev): bump eslint from 7.32.0 to 8.2.0, run [weblate steam oreversion orespongeversions gitlabcoverage] (#7235)
* chore(deps-dev): bump eslint from 7.32.0 to 8.2.0

Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.2.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v8.2.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* deps: update ts-eslint plugins

* chore: apply linter fixes

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2021-11-06 19:06:03 +00:00
Caleb Cartwright
50c0be0029 add GitLab Release badge, run all [GitLab] (#7021)
* feat: add GitLabRelease badge

* use single project route param

* add query param for date ordering

* add test for nested subgroup

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-10-22 22:08:42 -05:00
Caleb Cartwright
a43c98a89a Supported nested groups on [GitLabPipeline] badge (#7159)
* feat: supported nested groups on gitlab pipeline status badge

* satiate the formatting gods

* use main as default branch

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-10-16 19:12:02 +00:00
Caleb Cartwright
694b07d636 Support nested groups on [GitLabTag] badge (#7158)
* refactor: support groups on gitlab tag badge

* fix mocked test

* add nested subgroup test

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-10-16 18:47:03 +00:00
Caleb Cartwright
961e13b229 Add API-based support for [GitLab] badges, add new GitLab Tag badge (#6988)
* Added GitLab Tag service

* Added prettyMessage for when repo has no tags

* Added pretty message for repo not found

* core: esm-ify gitlab tag service

* feat: support gitlab auth

* feat: support custom gitlab url on tag badges

* tests: add auth test for gitlab

* docs: fix gitlab config key references

* feat: support gitlab tag sorting options

* docs: add custom gitlab instance example for tags badge

* use v in gitlab route

* fix: gitlab tag examples

Co-authored-by: Ideotec <guille@ideotec.es>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-09-14 23:06:57 +00:00
chris48s
5b583cc9ef fix failing [gitlab] test (#6885)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-08-11 22:11:29 +00:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
dependabot-preview[bot]
ee83590942 Build(deps-dev): bump @typescript-eslint/eslint-plugin from 2.34.0 to 4.19.0, run [GitHub GitlabCoverage F-Droid Wordpress VisualStudioAppCenter Ore Packagist] (#6319)
* Build(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.34.0 to 4.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.19.0/packages/eslint-plugin)

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

* chore: update eslint camelcase rule

* chore: eslint camelcase updates for wordpress

* chore: fix eslint camelcase for misc other services

* chore: fix eslint camelcase issue in github and gitlab

* chore: run prettier

* chore: account for JSX globals

* deps: bump typescript-eslint-parser to v4

* chore: frontend lint changes

* chore: update eslint config to only run @typescript-eslint/explicit-module-boundary-types on ts files

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com>
2021-03-28 08:26:01 -05:00
chris48s
504015c0ba migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
Caleb Cartwright
fc91038652 Fix [GitlabPipeline] not found repo service test (#5538)
* tests(GitlabPipelineStatus): fix not found service test

* docs: describe gitlab innaccessible message

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 20:08:23 +00:00
Thakur Karthik
c997a2aa5c refactor gitlab,gitter,hackage,hexpm service files (#5575)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-19 17:00:46 +00:00
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