Skip to content

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.

Notifications You must be signed in to change notification settings

DudekJakub/GitHubApiClient_Kohsuke_DEMO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHubApiClient_Kohsuke_DEMO

AUTHOR: JAKUB DUDEK


In case of any questions, I am available at the e-mail jakub.dudek94@gmail.com and no. phone +48 783 963 469.


ABOUT:

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.

image


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


HOW TO USE:

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:
image


STEP 2
Pick settings option:
image


STEP 3
On the left vertical list of options go to the very last one called Developer Settings:
image



STEP 4
Now click Personal access tokens option:
image


STEP 5
Pick Fine-grained tokens option:
image


STEP 6
Click Generate new token button:
image


STEP 7
Confirm your credentials.


STEP 8
Provide token name and expiration time then pick:
image
...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=):
image
image
image



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



IMPORTANT!

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.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages