Git Product home page Git Product logo

octo-events-kotlin's Introduction

OctoEvents

App that listens Github events via webhooks and exposes an endpoint to filter it by issues.

Since it is a learning project, some language structures has its usage forced, still these usages are open to discussions

Tech stack

Installation

Assuming that you already have the technologies above pre-installed (if needed), clone the repository and install its dependencies.

# clone this repository
$ git clone https://github.com/douglasgabriel/octo-events-kotlin.git

# go inside the repository
$ cd octo-events-kotlin

# install dependencies
$ mvn clean install

Also you may want to configure your local database by changing the src/main/resources/application.properties file

Tests

The test suite can be executed by the following command

$ mvn test

Running

To run locally this project you will need to provide a public URL that routes to your local endpoint, so, the use of ngrok is recommended here.

$ ngrok http 3000

The default port is 3000, but it is possible to change it on file src/main/resources/application.properties

Then it is possible to run the project by the following command:

$ mvn spring-boot:run

Features

Github Events listener

The app defines the following endpoint to listen to Github events

[POST] /events

To integrate this APP with Github, you can navigate to the page of choosed repository, and then navigate to settings -> Webhooks and click on Add Webhook button. Finally you can fill the Payload URL field with $public_url/events and submit.

Now, when you create and update a Issue inside the choosed repository, the Github will request the given Payload URL, and then the APP will persist the Event and the associated Issue in database.

Filter events by Issue

The app also defines the following endpoint to get every Event of a particular Issue

# where number is the issue number
[GET] /issues/:number/events

octo-events-kotlin's People

Contributors

douglasgabriel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.