Challenge Overview
Welcome to Project Luettich - Man in the Middle Nodejs Contest. This contest is part of a series of contests to build Topcoder’s new offering - Topcoder X - where we use Github and Gitlab to run Bug Bash contests.
Project Overview
Until now, Topcoder has been running Bug Bash contests off Github and Gitlab. The process is however still in manual transmission - labels are added manually, payments are made manually. There is no direct integration between the Github and Gitlab platforms and Topcoder. This project is aimed to integrate Github and Gitlab platforms with Topcoder.
Contest Details
Create a nodejs server to handle events that Github raises. Namely, we are looking at handling the following events:
-
Issue Created
-
Issue Updated
-
User comments on an issue
-
Issue is assigned to a user
-
A label is assigned to an issue
-
Pull Request is created
-
Pull Request is closed without merging
-
Pull Request is accepted / merged.
-
User is unassigned from an issue
We will have an event handler that passes on the event data to a messaging queue - Apache Kafka in this case. So Github sends the events to your server, your server then puts the message onto Kafka which is then read by another Nodejs server, which ends up calling certain Topcoder APIs based on the event raised.
For this contest, you need to provide:
-
The nodejs server that handles events from Github and pushes them on Kafka
-
The nodejs server that reads messages off Kafka.
You don’t have to call any Topcoder APIs for this contest.
When passing the event data into the message queue, you only need to pass the following attributes (Github sends a lot more information and you need to narrow it down to just the following fields) depending on the nature of the event:
-
Repository id and full name
-
Issue number, title, body, comment, owner (created by), labels, status (use action attribute in the payload), assignee.
-
Pull request number, title, body, comment, owner (created by), status (use action attribute in the payload), assignee.
Points To Note
-
Use Nodejs version 8
-
Use Basic Authentication for Github - username and password will be provided in a configuration file.