27 Commits

Author SHA1 Message Date
jNullj
04638ab0ee Refactor - use renderVersionBadge - part 4 [githubrelease githubtag] (#10656)
* feat: add forcePrerelease option to renderVersionBadge function

Sometimes API would indicate if a version is pre-release while the version number does not have to be semantically a prerelease like in github-release service.
We don't use a isPrerelease that can also force a non-preleases as we trust here developer semantic over API tagging.

* refactor: GithubRelease to use renderVersionBadge

* refactor: GithubTag use renderVersionBadge

* refactor: change forcePrerelease to isPrerelease
2024-11-11 19:16:14 +00:00
Pierre-Yves Bigourdan
f57c4edbb9 Remove namedLogo from defaultBadgeData of non-social badges (#10195) 2024-05-27 20:34:38 +00:00
chris48s
e8a148eed3 migrate examples to openApi part 34; affects [github] (#9865)
* fix github service tests

* migrate some services from examples to openApi

* document latest variant with separate examples

making seperate routes for the /{version} and /latest variants
allows us to only show the docs for
- include_prereleases
- sort and
- filter
in the situation where they are relevant
2024-01-04 20:02:03 +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
1543d0f363 Allow user to filter github tags and releases (#9193)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-03 20:27:31 +00:00
Caleb Cartwright
bfc2f96dc0 support using release or tag name in [GitHub] Release version badge (#7075)
* feat: support using release or tag name in GitHubRelease version badge

* add comment to query param test

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-10-14 22:41:27 +00:00
chris48s
45a9c90782 Revert "prefer release.name in [Github] release badge (#6879)" (#6880)
This reverts commit a4c93c56e7.
2021-08-10 07:48:27 -05:00
chris48s
a4c93c56e7 prefer release.name in [Github] release badge (#6879) 2021-08-09 14:59:29 +01:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
Caleb Cartwright
5d0116f959 convert some service classes to static fields, run [GithubPipenv GithubPullRequestCheckState GithubReleaseDate GithubRelease GithubRepoSize] (#5622)
* refactor(githubpipenv): convert to static fields

* refactor(githubpullrequest): convert to static fields

* refactor(githubreleasedate): convert to static fields

* refactor(githubrelease): convert to static fields

* refactor(githubreposize): convert to static fields
2020-09-29 02:15:49 +00:00
dependabot-preview[bot]
478d14300c Build(deps-dev): bump eslint-plugin-import from 2.20.1 to 2.20.2 (#4859)
* Build(deps-dev): bump eslint-plugin-import from 2.20.1 to 2.20.2

Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.20.1 to 2.20.2.
- [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.20.1...v2.20.2)

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

* Fixes

* refactor: combine imports

* refactor: combine imports

* refactor: combine imports

* refactor: update import ordering

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: Paul Melnikow <email@paulmelnikow.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com>
2020-04-16 18:39:13 -05:00
Anton Gilgur
7f7ecfd111 add sort and prerelease query params to [GitHubCommitsSince] (also refactors [GitHubRelease], [GitHubTag]) (#4395)
* move getLatestRelease logic from [GitHubRelease] to common-fetch

- so that the sorting and prerelease logic can be used for other
  services too, like commits-since

* add sort and prerelease query params to [GitHubCommitsSince]

- they only work when using the 'latest' version of course

- uses same logic as release service

* reuse queryParamSchema from common-fetch for [GitHubTag]

- as they were the exact same schema

* refactor [GitHubCommitsSince] tests to use withRegex

- and the same variable everywhere

* split out release/tag logic from common-fetch to common-release (affects [GitHubCommitsSince], [GitHubRelease], [GitHubTag])

- this logic is only used for code related to releases & tags, so made
  sense as a split point

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-02-13 22:18:29 -06:00
dependabot-preview[bot]
0f332413df Build(deps-dev): bump prettier from 1.18.2 to 1.19.1 (#4328)
* Build(deps-dev): bump prettier from 1.18.2 to 1.19.1

Bumps [prettier](https://github.com/prettier/prettier) from 1.18.2 to 1.19.1.
- [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.18.2...1.19.1)

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

* Build(deps-dev): bump prettier from 1.18.2 to 1.19.1

Bumps [prettier](https://github.com/prettier/prettier) from 1.18.2 to 1.19.1.
- [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.18.2...1.19.1)

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

* chore: apply new prettier formatting

* chore: try prettier, again
2019-11-15 19:33:40 -06:00
Paul Melnikow
414a77f3a8 Fix [GithubRelease] not found case with include_prereleases (#4304)
With a couple minor stylistic changes for readability.

Closes #4303
2019-11-07 15:04:02 -07:00
chris48s
5168675d0d move [githubtag] and [githubrelease] under /v, move variants to query params (#3610)
* move GH tag and release under /v, move variants to query params
    - move github /tag and /release under /v
    - both sort by date as default
    - specify sort=date/semver, include_prereleases as query params
    - use graphql api for tags

* pass string params from example defs to modal
2019-08-17 22:16:41 +01:00
chris48s
75ee413178 Add BaseGraphqlService, support [github] V4 API (#3763)
* add base class for Graphql APIs
* add GithubAuthV4Service + updates to GH token pool
* update github forks to use GithubAuthV4Service
* rename GithubAuthService to GithubAuthV3Service
2019-07-29 21:42:03 +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
Paul Melnikow
f13326dddf Rewrite [githubcommitssince]; also test [githubrelease] (#3350) 2019-04-22 18:54:58 -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
9fa9785568 Rewrite [GithubRelease] (#3098) 2019-02-25 14:33:52 -05:00
chris48s
fba846986a fix logo imports in [github twitter liberapay] (#2817)
this was moved in #2796 but we missed updating some of the imports
2019-01-20 23:19:12 -05:00
Paul Melnikow
8a10279d95 Add static preview to some [GitHub] services (#2766) 2019-01-15 21:43:35 -05:00
Paul Melnikow
b36a9040f3 Add warning banners to legacy services (#2546) 2018-12-18 20:52:17 +00:00
Paul Melnikow
fe05d00747 Move github examples into services/github (#2309) 2018-11-15 15:57:56 -05:00
Paul Melnikow
83ac6ff1b3 Enforce use of template literals (#2242)
This is consistent with what we're pretty much already doing, and saves us from making the request during code review.

These were all autofixed and most of them seem easier to read. Some in the legacy services should be rewritten in more legible forms during refactor (ie using intermediate variables, or using request’s qs option). There are some in helper functions and elsewhere that should get rewritten separately. I don't want to change them in this PR because the changes will get lost in this diff, though we could identify them here and fix them before or just after.
2018-11-02 17:11:44 -04:00
chris48s
a74db34853 Allow [GitHub] tag badge to sort by date (#2157)
* add test for tag-pre
* support /releases-pre (but also allow /all for BC)
* allow GH tags to be sorted by date instead of semver
* fix license badge
2018-10-08 18:29:02 +01:00
Paul Melnikow
bedba47d77 Move legacy services from server.js into services/ (#1958)
This builds on the work of #1931 by moving the legacy services into `services/`.
2018-08-27 13:29:54 -04:00