API that listen to GitHub issue events from some repository
Here are some ways to run this app:
It has a image hosted on Docker Hub: https://hub.docker.com/repository/docker/tatsumibruno/octoevents
docker run -p 8080:8080 tatsumibruno/octoevents:0.0.1
- Import maven project
- Configure JDK 11
- Right-click on
Application
class and Run/Debug.
*You gonna need Java 11 and Maven
With terminal inside project folder, follow this steps:
Compile fat jar file:
mvn package verify
Execute:
java -jar /target/octoevents-api-0.0.1-SNAPSHOT.jar
Configure ngrok to forward your http port:
ngrok http 8080
Access your repository webhook settings:
Set your exposed URL (path /webhooks/events) and modify Content-Type to application/json:
Configure to listen just the issue events (and clear the others):
Add Webhook
Create some issue and modify its state (e.g Edit, Close, Reopen)
Access http://localhost:8080/swagger-ui.html and execute the endpoint to get the events from created issue:
Or just use CURL:
curl -X GET "http://localhost:8080/issues/1/events" -H "accept: */*" | jq
H2 Console is exposed at http://localhost:8080/h2-console