Commit Graph

279 Commits

Author SHA1 Message Date
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
chris48s
e8c42e9ec1 migrate service tests to GH actions (#8421)
* run service tests with GHA

* rename GithubGist services to Gist

* completely delete circle ci config
2023-01-17 20:55:57 +00:00
chris48s
2fb9889742 update [githubpipenv] tests/examples (#8797)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-01-14 20:37:46 +00:00
chris48s
c3d08f7f8b Send X-GitHub-Api-Version when calling [GitHub] v3 API (#8669)
* send X-GitHub-Api-Version when calling GitHub v3 API

* TODO: invesitgate

* read baseUrl from config.service.baseUri

* add workflow to check for new GH api releases on schedule

* format config/default.yml to match yaml.dump() format

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-31 15:56:04 +00:00
chris48s
41c53c73c2 allow all numeric branch names in [githubactionsworkflowstatus] (#8734) 2022-12-21 17:49:20 +00:00
chris48s
dd3e2df00a switch [GithubActionsWorkflowStatus] to SVG scraper (#8738) 2022-12-21 17:17:18 +00:00
chris48s
6049ef64c8 handle workflow runs that do not have a conclusion (#8717)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-12-15 22:41:33 +00:00
chris48s
61dd6c0443 switch from github workflows to github actions workflows; test [githubactionsworkflowstatus githubworkflowstatus] (#8475)
* switch from github workflows to github actions workflows

* update github actions workflow badge to use api

* add test case for missing branch param

* custom deprecation message
2022-12-15 18:36:17 +00:00
chris48s
c8a0a8660e tidy up [GitHubGist] routes (#8510)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-11-04 19:43:14 +00:00
chris48s
3528e842d7 fix [githubpullrequestcheckstate] service tests (#8548)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-29 18:59:36 +00:00
chris48s
91a6b6d913 require array to have at least 1 item in [githublastcommit] (#8563)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-27 19:32:59 +00:00
Paula Barszcz
c0087cae67 Add [GitHubLastCommit] by committer badge (#8537)
* add github last commit by committer badge

* modify queryParam

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-20 19:08:48 +00:00
Paula Barszcz
a251357881 [GitHubReleaseDate] - published_at field (#8543)
* gh release date - published at

* example correction

* change published_at query param to display_date

* simplify the  statement
2022-10-20 19:52:44 +01:00
Martin Costello
bd6a04ba03 fix: Support WAITING status for GitHub deployments (#8521)
Fix "invalid response data" badge label for GitHub deployments pending approval.
2022-10-15 20:29:38 +01:00
Tejas Dhamecha
78b5a6bf46 [GitHubGistStars] add GitHub Gist Stars (#8471)
* add schema and fetch method to service class

* add transform, render and handle method to service class

* add documentation and examples

* add tester

* add suggeseted changes

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-10-04 18:48:26 +00:00
Tejas Dhamecha
882b8c92e3 feat: add 2022 support to GitHub Hacktoberfest (#8468) 2022-10-02 09:01:33 -05:00
Paula Barszcz
e8f151eafa [GitHub] Number of commits between branches/tags/commits (#8394)
closes #6901
2022-09-16 21:48:23 +01:00
Prashant Rawat
e3c938b4d7 return string instead of object from getDependencyVersion function (#8396)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-09-13 19:38:18 +00:00
chris48s
ae018cdddc conform to standard js quote rules (#8395)
* restore standardjs quote behaviour

* conform to standard js quote rules
2022-09-12 17:22:12 +01:00
Paula Barszcz
f985d2cc02 [GithubGistLastCommit] GitHub gist last commit (#8272)
* Add github-gist-last-commit.service.js

* Still having difficulty with the reponse in the test file for github-gist-last-commit  being in svg format, rather than json

* Yay, tests are greeeeen, the best sight for sore eyes xD

* Apply suggestions from code review - destructuring+rename and path change

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Removed the unnecessary test from github-gist-last-commit

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2022-08-07 19:24:50 -05:00
Paula Barszcz
fa3839cdab [GitHub] GitHub file size for a specific branch (#8262)
* Modify github-size.service.js

* Add tests for Github Size Service to test the new ref parameter

* Modified request for a file size: ref is now sent only if if was specified
2022-08-02 21:33:13 +00:00
Jonah Lawrence
e8686395b1 refactor(deps): Replace moment with dayjs (#8192) 2022-07-14 20:34:38 -05:00
Jonah Lawrence
e7aecb1a3b Use GraphQL to fix GitHub file count badges [github] (#8112)
* fix: Use graphQL for github file count badges

* Add test for repo not found and update transform tests

* Fix extensions in transform test

* Mark type and extension as required

* Simpler type transform since only file, dir supported
2022-06-22 18:57:56 +01:00
Alexander Wert
5b0777918a [GitHub] Added milestone property to GitHub issue details service (#7864)
* Added milestone property to GitHub issue details service

* Fixed case when no milestone is available

* fixing unit test

* fixed service test for milestone property

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-05-21 00:53:27 +00:00
Paul Melnikow
4f219f1b92 Stringify [githublanguagecount] message (#7881) 2022-04-23 13:52:52 -05:00
Paul Melnikow
1fcc7e4b98 Stringify and trim whitespace from a few services (#7880) 2022-04-22 18:19:04 -04:00
chris48s
9186f0d262 improve python version formatting (#7682) 2022-03-06 20:25:29 +00:00
Pierre-Yves Bigourdan
2cf35912c1 Clarify GitHub All Contributors badge (#7690)
* Clarify GitHub All Contributors badge

* Add documentation text
2022-03-06 18:52:17 +00:00
Pierre-Yves Bigourdan
98c98efd45 Fix GitHub Deployments example color (#7691) 2022-03-06 10:53:09 -06:00