In case of any questions, I am available at the e-mail jakub.dudek94@gmail.com
and no. phone +48 783 963 469
.
This is a demo application that uses the kohsuke
library to connect to the GitHub Rest API and retrieve data on the user's repositories.
The application uses an synchronous, blocking classic approach, where requests are processed by so-called Servlets (used default server: Tomcat
).
The main assumption of the project is to provide an API that, using GitHub Rest API v.3 as a backing-api, enables obtaining processed information on the user's repositories.
This is a side solution to the functional requirements listed below.
Result endpoint is available under following url: http://localhost:8080/api/github/user/LOGIN/repositories
- where login is user to find.
Due to lack of time this ReadMe will be completed on the day 09.08.2023.
For now please visit main solution here:
LINK: https://github.com/DudekJakub/GitHubApiClient_WebFlux_DEMO
In order to run the application, Java version 17 and build-tool gradle are required.
In addition, to authenticate an application using GitHub Rest API v.3, it is required to generate the so-called. JsonWebToken. Instruction below:
STEP 1
Enter your GitHub account and click on your avatar picture:
STEP 3
On the left vertical list of options go to the very last one called Developer Settings
:
STEP 4
Now click Personal access tokens
option:
STEP 5
Pick Fine-grained tokens
option:
STEP 6
Click Generate new token
button:
STEP 7
Confirm your credentials.
STEP 8
Provide token name and expiration time then pick:
...from Permissions
list pick Repository permissions
and grant access to following options: actions
,code
,metadata
.
STEP 9
Now when your token is generated, copy it and paste it into application's environmental variables (with the name of variable GITHUB_JWT=
):
To create Windows system env. variable please following this link:
https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html
In case of integration tests JWT token need to be provided to TestClass run options (as env. variable) or for particular test if the test is about run by itself.