65 Commits

Author SHA1 Message Date
chris48s
7108e08670 use isDecimalPercentage in tests for github/lab top lang (#10752) 2024-12-31 13:25:38 +00:00
Brijesh Kumar
f643515ee1 Add [GitLab] Top Language Badge (#10750)
* Add: GitLab Top Languages Badge

* Fix: Doc heading

* Add: Test cases + Rename service

* Update: Test URL

* Update: Requested Changes
2024-12-20 10:49:46 +00:00
chris48s
5cdef88bcc Add renderDateBadge helper; affects [aur BitbucketLastCommit chrome date eclipse factorio galaxytoolshed GiteaLastCommit GistLastCommit GithubCreatedAt GithubHacktoberfest GithubIssueDetail GithubLastCommit GithubReleaseDate GitlabLastCommit maven npm openvsx snapcraft SourceforgeLastCommit steam vaadin visualstudio wordpress] (#10682)
* add and consistently use parseDate and renderDateBadge helpers

also move

- age
- formatDate
- formatRelativeDate

to date.js

* fix bug in wordpress last update badge

* validate in formatDate() and age()

it is going to be unlikely we'll invoke either of these
directly now, but lets calidate here too

* remove unusued imports

* reverse colours for galaxy toolshed
2024-11-17 13:15:28 +00:00
jNullj
cc90c190f2 Refactor - use renderVersionBadge - part 3 [luarocks gitlab nuget feedz] (#10630)
* Refactor luarocks to use renderVersionBadge

Loarocks does not appear to have version conventions and there are no issues in history that require usage of existing color usage.
For better consistency use color scheme as the rest of the badges.

Also add scm and cvs as preview in renderVersionBadge

* add missing test for version color formatter

* refactor nuget to use renderVersionBadge

* Refactor GitlabTag to use renderVersionBadge

* add comment about non-standard render of coljarsVersion

* Refactor FeedzVersionService to use renderVersionBadge from version.js

* Refactor nuget.tester.js to remove unnecessary version tests

* add missing label in gitlab-tag.spec
2024-10-27 13:35:03 +00:00
chris48s
3c60625c51 improve performance of [GithubLastCommit] [GitlabLastCommit] [GiteaLastCommit] (#10046)
* improve performance of last commit badges

* pass param in the right place
2024-03-25 15:12:28 +00:00
ReubenFrankel
4f141dfa84 [GithubLastCommit] [GitlabLastCommit] [GiteaLastCommit] Support file path for last commit (#10041)
* Support file path for GitHub last commit

* Support file path for GitLab last commit

* Support file path for Gitea last commit

* Define common `relativeUri` validator

* Sort imports

* Add more tests for path variations

* Fix test name

Co-authored-by: chris48s <chris48s@users.noreply.github.com>

* Update Gitea 404 message

* Handle case when no commits are returned for GitHub and GitLab

---------

Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2024-03-25 12:10:04 +00:00
chris48s
bd3a11b4b6 upgrade to docusaurus 3 (#9820)
* update packages

* add plugin to strip autolinks in code blocks

* fix all the documentation for MDXv3

* remove check-docusaurus-versions

in docusaurus 3 this is now a hard error, not just a warning

* port upstream change to Curl component

fixes performing the 'execute' action when pressing enter
2024-03-23 19:54:57 +00:00
Pierre-Yves Bigourdan
04254e5905 Ensure social category badges are rendered with social style and logo; affects [gitlab keybase lemmy modrinth thunderstore twitch] gist github reddit (#9859)
* Ensure social category badges are rendered with social style and logo

* Fix Twitch auth test
2023-12-31 14:08:55 +00:00
chris48s
10bf39632a migrate examples to openApi part 26; affects [gitlab] (#9752)
* replace failing 'other' test with a mock

* update pipeline/coverage 'not found' tests

* migrate gitlab from examples to openApi

* eat own tail
2023-12-30 17:38:31 +00:00
chris48s
cab0286608 migrate examples to openApi part 16; affects [gitlabrelease swagger] (#9565)
* convert gitlab release from examples to openApi

* convert swagger from examples to openApi

* DRY up enums (1)

* DRY up enums (2)
2023-11-01 20:33:44 +00:00
dependabot[bot]
b9d96755ec chore(deps-dev): bump prettier from 2.8.8 to 3.0.0 (#9357)
* chore(deps-dev): bump prettier from 2.8.8 to 3.0.0

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

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

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

* reformat all the things (prettier 3)

* update tests to await calls to prettier.format()

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris48s <git@chris-shaw.dev>
2023-07-10 09:27:51 +00:00
chris48s
a5f91a40e5 fix a load of spacing issues in frontend content (#9281) 2023-06-18 09:05:42 +01:00
chris48s
14892e3943 Implement a pattern for dealing with upstream APIs which are slow on the first hit; affects [endpoint] (#9233)
* allow serviceData to override cacheSeconds with a longer value

* prevent [endpoint] json cacheSeconds property exceeding service default

* allow ShieldsRuntimeError to specify a cacheSeconds property

By default error responses use the cacheLength of
the service class throwing the error.

This allows error to tell the handling layer the maxAge
that should be set on the error badge response.

* add customExceptions param

This

1. allows us to specify custom properties to pass to the exception
   constructor if we throw any of the standard got errors
   e.g: `ETIMEDOUT`, `ECONNRESET`, etc
2. uses a custom `cacheSeconds` property (if set on the exception)
   to set the response maxAge

* customExceptions --> systemErrors

* errorMessages --> httpErrors
2023-06-13 21:08:43 +01:00
guoxudong
d52ab7867a feat: add [GitlabLastCommit] service (#8508)
* feat: add gitlab last commit service

* fix

Signed-off-by: guoxudong <guoxudong.dev@gmail.com>

Signed-off-by: guoxudong <guoxudong.dev@gmail.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2022-10-25 20:40:46 +01:00
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