* 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
* convert an example that doesn't matter
* migrate some services from examples to openApi
* improve and de-dupe service titles
* revert changes to codefactor
* 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
* 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>
* 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
* 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>
* 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>
* 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
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
* 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
* 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
* 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>