Hauffe / github-issues

0 stars 0 forks source link

📁 Get Issues from any repository using GitHub Api

This Spring boot application is responsible for retrieving the contributors and Issues from a given repository in GitHub via webhook after a given time (default set to 1 hour)

🛠️ How to run

Please follow the instructions to run this application:

Maven build:

    mvn clean
    mvn install

To run the integration, please run:

    mvn install -DskipITs=false

Go to the \github-issues\target directory and find the github-issues-0.0.1-SNAPSHOT.jar file built, then run:

    java -jar .\github-issues-0.0.1-SNAPSHOT.jar

Now, if everithing works, please check the /about endpoint at:

    http://localhost:8080/issues/about

You may see the following text:

    Github information API (Version 1.0) created by Alexandre Hauffe

How it works

Endpoints:

There is one endpoint responsible for scheduling a POST to a remote api represented by a Webhook

application.yml:

Final considerations

This exercise has async and remote request components. Those are the building blocks for developing this solution. I experimented several ways of putting the right code in the right spot and this is the best way I've found for now. Also, the builder pattern was created not for the moment necessity, but for enhancing the maintainability and scalability of the system, to make it easier to add new features in the future. This was also the reason of creating external settings for the remote URIs and the "time to post", which are called by the UrlCaller. There is room to improve, but this is the MVP for now, done in 1 week.