- Notifications
You must be signed in to change notification settings - Fork0
Generated GitHub Java Client
License
pulpogato/pulpogato
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
For releases, use mavenCentral.
https://repo.maven.apache.org/maven2/
For snapshots, use this url.
https://central.sonatype.com/repository/maven-snapshots/
The maven group id isio.github.pulpogato
.
The maven artifact id ispulpogato-<api-type>-<gh-version>
.
Theapi-type
is one ofgraphql
orrest
.
Thegh-version
is one ofghec
,fpt
, orghes-<GHES-version>
.
Example in a gradle kotlin build script
ext { set("netflixDgsVersion","9.1.2") set("ghesVersion","fpt") set("pulpogatoVersion","0.2.0")}dependencies { implementation("io.github.pulpogato:pulpogato-rest-${property("ghesVersion")}:${property("pulpogatoVersion")}") implementation("io.github.pulpogato:pulpogato-graphql-${property("ghesVersion")}:${property("pulpogatoVersion")}")}dependencyManagement { imports { mavenBom("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:${property("netflixDgsVersion")}") }}
Install JDK 21 first.
To get the rest schemas, installbun.The gradle build will use bun to download schemas.
To build, run./gradlew build
.If you have low memory or CPU, you can customize parallelism with--max-workers
.
When the REST schema contains examples, they are automatically converted to tests in the generated test sources directory.
To contribute a test for the REST API:
Write a test like the ones in
UserApiIntegrationTest
.Then set up the environment variable
GITHUB_TOKEN
.If you’re running a test against a GitHub Enterprise instance, set up
GITHUB_HOST
andGITHUB_PORT
as well.Run a command like
./gradlew :pulpogato-rest-fpt:test --tests AppsApiIntegrationTest
.That generates a yaml file in
src/test/resources
. If it needs cleaning up for sensitive data, do so.
To contribute a Webhook test:
Capture the HTTP request from the webhook using any tool. If you’re looking at public data, something like RequestBin is useful.
Clean up the data and place it in
pulpogato-rest-tests/src/main/resources/webhooks/
under the right directory based on thex-github-event
header.Verify the tests work.