Hackathon#4 - They boost Git Projects with their GitBot
Dec 12, 2016
If you love Github Project, we have good news for you! Our Team with Antoine, Erwan and Albin have improved the new Git Project, they automated the status of the cards in order to move them automatically to the right column by using labels. Their code is available here for further info : https://github.com/KnpLabs/gitbot/projects/1
They worked on the different automatisation tasks :
- Move cards to the appropriate column according to their labels
- Synchronize project columns and labels
- If a card is closed, it is automatically moved to the last column
- By adding an issue in github, it is shown automatically in the first column of the github project page.
- Move automatically an issue into the “done” column when a PR is merged or closed
- We used ECMAScript6 (and all its brand new features: Promises, destructuring, arrow functions, string interpolations...) to create the bot. Also, we used the latest Express version to help us creating the API.
- We started by designing our API using RAML, which is “contract-first driven” (whereas other tools like swagger).
- The API has 4 endpoints to manage (start and stop) the gitbot, and to receive events from Github.
- Those events are then dispatched to RabbitMQ, and a worker will wait for them. Then this worker will do all the business job.
- Docker Compose to create the services
It was mostly a fun way for us to discover more about ECMAScript6 and all its brand new features like Promises, arrow functions, destructuring, classes & modules, ...