Commit Graph

307 Commits

Author SHA1 Message Date
Pierre-Yves Bigourdan
d502e7031f [GitHubHacktoberfest] 2024 support (#10612) 2024-10-13 18:15:07 +00:00
chris48s
dc57a8893c move go version badge to platform support category (#10444) 2024-08-15 22:39:07 +00:00
Pierre-Yves Bigourdan
1585d157c1 Cleanup unused bits and pieces (#10349) 2024-07-13 18:57:54 +00:00
chris48s
e6c8d079c9 include gituhb contributors badge in docs site (#10337) 2024-07-09 14:11:14 +00:00
Pierre-Yves Bigourdan
81585acd6b Fix [GithubPullRequestCheckState] test (#10200) 2024-06-02 22:43:55 +02:00
Pierre-Yves Bigourdan
f57c4edbb9 Remove namedLogo from defaultBadgeData of non-social badges (#10195) 2024-05-27 20:34:38 +00:00
Marc Bernard
427b24c98a Update description of GitHub commit status badge (#10198)
* [GitHub] update description of commit status badge

* fix typo

* Add pull request check

* regex to english
2024-05-26 17:16:08 +02:00
Marc Bernard
e43cb0c9b5 chore: fix spelling of GitHub in badge descriptions (#10199) 2024-05-26 09:16:39 +00:00
Marc Bernard
12f54f3375 Add [GithubCheckRuns] service (#7759)
* Add [GithubCheckRuns] service

* Adjust ref parameter

* Rework

* Prettier

* Prettier

* Function

* Prettier

* Change CR to LF

* Adjust after #9233

* Lint camelCase

* Fix camelCase

* Fix prettier

* Switch to openAPI spec for examples

* Fix type of parameters

* Fix too many brackets

* Lint

* Add optional name filter

* Update tests

* Remove logo
2024-05-25 10:35:25 +00:00
Marat Reymers
caea7597f9 [GitHubGoMod] Ignore comment after version (fixes #10079) (#10080)
* [GithubGoMod] Ignore comment after version (fixes #10079)

* add unit tests for GithubGoModGoVersion.transform

---------

Co-authored-by: chris48s <git@chris-shaw.dev>
2024-04-07 08:02:49 +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
Eray Erdin (&mut self)
ea9445b74e [GithubCreatedAt] Add Created At Badge for Github (#9981)
* init GithubCreatedAt service

* render raw created_at

* impl formatted date

* add color

* add test for absent repo

* add `reversed` parameter to `age` color formatter

* inverse the colors of the badge

---------

Co-authored-by: Studio <studio@192.168.1.20>
2024-02-26 20:01:48 +00:00
chris48s
095e4f889a migrate some services from examples to openApi part 45; affects [github coveralls visualstudiomarketplace] (#9930)
* migrate some services from examples to openApi

* update e2e test to use simpler example
2024-02-11 13:04:42 +00:00
chris48s
4319367c40 migrate some services from examples to openApi (#9904) 2024-01-29 11:05:40 +00:00
chris48s
af19335c5a migrate some services from examples to openApi (#9915) 2024-01-29 11:05:35 +00:00
chris48s
5fb78c50ef migrate examples to openApi part 38; affects [github] (#9889)
* migrate some services from examples to openApi

* Update services/github/github-size.service.js

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>

---------

Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>
2024-01-13 18:31:59 +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
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
7404d4e207 increase page size for github release badge by semver (#9818) 2023-12-30 17:38:36 +00:00
chris48s
bd288db3a4 migrate examples to openApi part 18; affects [conda feedz gem openvsx readthedocs] github (#9607)
* migrate some services from examples to openApi

* fixup which --> variant param rename

* improve descriptions

* migrate gem version

* improve descriptions for ruby gems

* standardise on packageName for all conda badges
2023-12-23 18:19:15 +00:00
chris48s
45bb786147 log 429s to sentry (attempt 2); affects [dynamic endpoint uptimerobot weblate opencollective discord github] (#9546)
* log to sentry if upstream service responds with 429

* allow services to decide which error(s) to log, default to 429

* don't log 429s from endpoint or dynamic badges

* supress 429s from uptime robot badges

* supress 429s from weblate if not calling default server

* cache opencollective badges for longer

* cache discord badges for longer

* cache github workflow badges for longer
2023-12-04 13:37:58 +00:00
chris48s
5ad1e35101 fix [GitHubCommitActivity] service tests (#9736) 2023-11-19 19:24:11 +00:00
dependabot[bot]
a7e6f15e5e chore(deps-dev): bump prettier from 3.0.3 to 3.1.0 (#9745)
* chore(deps-dev): bump prettier from 3.0.3 to 3.1.0

Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.1.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/3.0.3...3.1.0)

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

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

* update formatting

---------

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-11-19 19:13:15 +00:00
chris48s
3512c89054 migrate examples to openApi part 12; affects [GitHub Gist] (#9500)
* migrate some services from examples to openApi

* improve and de-dupe service titles

* improve description
2023-11-13 14:30:26 +00:00
Kurt McKee
9874db7841 Fix several typos (#9658) 2023-10-13 15:40:57 +00:00
Bartosz Gałek
685421f890 Hacktoberfest 2023 support - resolves #9636 (#9637) 2023-10-05 17:17:39 +00:00
chris48s
e8157100b8 migrate examples to openApi part 11: enums; affects [codefactor conda depfu homebrew jsdelivr reddit sourceforge testspace vaadin github] (#9437)
* WIP enums

* WIP moar enums

* add a helper function for extracting enum from route pattern

* add enum schemas to services

* review and improve service names

* convert some more services with enums

* review and improve service names

* fix issue/pull request detail
2023-08-30 16:14:18 +00:00
chris48s
6823d38ddf migrate examples to openApi part 4; affects [ecologi elm flathub gem gitter GithubTotalDiscussions greasyfork hackage hackernews homebrew] (#9430)
* migrate some services from examples to openApi

* improve and de-dupe service titles

* revert changes to homebrew
2023-08-21 10:08:27 +00:00
chris48s
b2f47a3303 migrate examples to openApi part 2; affects [archlinux bitcomponents bountysource cdnjs chrome clearlydefined clojars cocoapods coincap] (#9428)
* convert an example that doesn't matter

* migrate some services from examples to openApi

* improve and de-dupe service titles

* revert changes to codefactor
2023-08-08 23:57:47 +00:00
chris48s
c586960ce8 allow calling [github] without auth (#9427)
* allow calling [github] without auth

* set a default for authType, fix broken tests
2023-08-07 14:51:18 +00:00
chris48s
d4faad1139 fix [github] service tests (#9425)
* bring GH downloads/release errors into line

* update GH lerna test example

* update GH package.json test example

* update GH pipenv test example

* update GH search test assertion
2023-08-07 14:37: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
71cd657e3c improve docs for github issues search badge (#9360)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-08 10:52:03 +00:00
jNullj
1251adaec2 Add [GitHubDiscussionsSearch] and GitHubRepoDiscussionsSearch service (#9340)
* Add GitHub Discussions custom search service

This commit adds a GitHub Discussions custom search service in the github-discussions-custom-search.service.js file. It includes classes for global discussions search (GithubDiscussionsSearch) and repository-specific discussions search (GithubRepoDiscussionsSearch). Users can now search discussions with custom queries and retrieve the discussion count.

Fixes #9213

* Add tester to GithubDiscussionsSearch

* Add documentation for GithubDiscussionsSearch

Inform users of filters and query values for the free search.

* Update GithubDiscussionsSearch examples

Change examples from filter by author to `filter` by `answered-by` as this has higher change of being a more common use case.

* fix typo

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
2023-07-07 20:30:16 +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
chris48s
e7197f6db4 don't URL encode slash in [githubactionsworkflow] badge (#9322)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-07-03 20:01:13 +00:00
chris48s
a5f91a40e5 fix a load of spacing issues in frontend content (#9281) 2023-06-18 09:05:42 +01:00
chris48s
50ea7068a8 migrate frontend to docusaurus (#9014)
* delete loads of really important stuff that we definitely need

* v basic MVP smoosh docusaurus PoC into repo

* TODO

* delete more really important stuff

* TODO

* tidyup: use run-s

* don't redirect images used in frontend to raster proxy

* fix routing

* preserve the /endpoint link

* delete the blog (for now)

I would quite like to re-add this at some point
but its not really the top priority thing right now

* content edits

* appease the lint gods

* update danger rules

* remove placeholder

* cypress tests

* dockerhub --> ghcr

* Revert "dockerhub --> ghcr"

This reverts commit ef74cbb26b.

* downgrade lockfile format

* implement defs/BASE_URL

* fix e2e build

* actually fix cypress tests

* always run cypress tests on build

* this never worked

* add command for docusaurus:clear

* delete more code we don't need any more

* update ESLint/prettier config

* delete unsused exports

* documentation updates

* delete a fairly large chunk of our dependency tree

* allow base_url as build arg to Dockerfile

* fixup dockerfile

* work out base url at runtime if not set

doing this at image build time is not the right approach

* remove gatsby monorepo from closebot

* rename HomepageFeatures to homepage-features
2023-06-17 10:59:07 +01:00
jNullj
67d935492d feat: Add author filter option for [GithubCommitActivity] (#9251)
* feat: Add author filter option for CommitActivity

Add a new filter option to [GithubCommitActivity], allowing users to filter the commit activity by a specific author.

To make the filter more explicit, The label display "commits by [author]" for the total amount of commits and "commit activity by [author]" for other intervals when an author filter is selected.

To maintain a clear and organized code structure, The filtered author is added as an argument and not to the shield path.

The request to find the number of commits by the author is made using the REST api rather then the GraphQL api to make it in 1 request rather then 2.

Resolves #9215

* fix: solve eslint errors

* Add tests for [GithubCommitActivity] filter by author

Add tests for the new filter by author feature.

* update [GithubCommitActivity] spec file for new author feat

Add test for new transformAuthorFilter function of GithubCommitActivity added for the author filter feature.

* Fix null string for label of GithubCommitActivity

* Update GithubCommitActivity example

* improve error handeling for GithubCommitActivity

The author filter error handling removed was redundent as it would never execute, there is no way to seperate branch not found from repo not found.

* update depricated functions

PR #9233 replaced errorsMessages with httpErrors.
This commit updates the new changes to stay up to date with that PR

* remove test for nonexisting error

this exception was removed in commit 9e358c8 and is not needed anymore

* Fixed test for commit activity unexisting repo

* Update example for GithubCommitActivity

Picked a user with commits in the repo as an example that would work

* Add test for invalid commit activity branch

Add test for REST API calls in commit activity branch

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
2023-06-15 19:20:16 +01:00
jNullj
35dfd75ef5 Fix: [GithubCommitActivity] invalid branch error handling (#9258)
* Fix error handling of bad branch in [GithubCommitActivity]

When GraphQL response with a bad repo it returns an error indicating the bad repo.
When GraphQL has the currect repo with a bad branch it will null inside the repo object without an error object.
The privouse commits seems to try and use that but due not allowing null in schema it did not work and an error due to bad schema would show insted.

This commit fixes this issue

* Add test for invalid branch in [GithubCommitActivity]

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
2023-06-14 20:53:48 +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
chris48s
64d3380e1f fix typo in test name (#9216) 2023-05-30 15:03:19 +01:00
jNullj
8a11db8265 feat: Add total commits to [GitHubCommitActivity] (#9196)
* feat: Add total commits to GithubCommitActivity

As part of a new feature proposed at issue #6070 added the requested feature.
I also used the conversation at pull request #6081 as a basis for those changes.

This change adds a new interval to the github/commit-activity shield 'total' (t for short).
The interval shows the total commits of the repo since its creation.

* Fix format with prettier

* Label for 'total' interval is now commits

Label change for the 'total' interval from 'commit activity' to 'commits'

---------

Co-authored-by: jNullj <jNullj@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-05-29 19:46:41 +00:00
chris48s
0c44117b5b count private sponsors on [GithubSponsors] badge (#9170) 2023-05-13 17:10:40 -05:00
chris48s
b96192eec6 remove redis token persistence backend (#9065)
* remove redis token persistence backend

* error and exit if redis_url is set
2023-04-15 20:17:35 +01:00
chris48s
26bf69cfe7 misc minor fixes to [githubsize node pypi] (#8946)
* fix some params incorrectly marked as optional

all of these are really required

* make '@' part of the param (not route) for scoped packages

* minor HTML tweaks to sonar help

---------

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-03-01 20:24:41 +00:00
chris48s
091ccfdbcd migrate token pooling to postgres (#8922)
* add ability to store token pool in Postgres DB

* update transitive ansi-regex dependencies
2023-02-23 17:18:39 +00:00
chris48s
c2fe2ffa2e documentation html fixes (#8887)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-02-12 18:47:16 +00:00