Challenge Overview

Challenge Objectives

  • Topcoder-X is a node web application used by copilots to manage direct tasks.
  • This challenge will implement support for Azure DevOps, in a proof of concept fashion

Project Background

Topcoder-X is a framework we are building to allow for easy, transparent integration with Gitlab and Github for managing tasks on Topcoder through Gitlab and Github issues.  After this challenge, we will also support Azure DevOps. Each issue on Gitlab or Github will be automatically associated with a specific challenge on Topcoder and this challenge will be updated automatically for assignee, prize, etc... and it will be opened and closed for payment as the Gitlab or Github ticket is opened, modified, and closed.

This challenge is part of a long-term series that will tweak the existing functionality based on feedback from copilots, fix bugs, and will implement new functionality.
Technology Stack
  •     NodeJS is used as the main language for Topcoder-X.  
  •     DynamoDB is used for data storage, and Kafka is used for message queueing.
  •     Note that this environment takes a fair bit of configuration to get all the pieces set up and working together.  Please ensure you budget a proper amount of time to work through deployment issues.

Code access

There are currently three pieces to this app:
The receiver handles incoming messages on activity from both Gitlab and Github.  These messages are passed as part of webhook callbacks that are supported on each platform.  The receiver parses these messages from the Gitlab or Github specific format, creating new, consolidated messages that get pushed into Kafka and then "processed" by the processor.

The UI is going to be used by copilots and others to set up the necessary settings for individual projects in Topcoder-X, including all the repo and Topcoder project information.  It will also be used by copilots to have a centralized view of all their projects at once.

You can find detailed information on deployment and configuration here.  You can use DynamoDB locally if you want:  https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html

https://github.com/topcoder-platform/topcoder-x-ui/blob/develop/TopcoderXDeploy.md

A general user guide can be found here:

https://github.com/topcoder-platform/topcoder-x-ui/wiki

Individual requirements

For this challenge, we want to build out support for Azure DevOps as a third repository that can be integrated in as a project type for Topcoder-X.  This will require changes to:
  • Topcoder-X receiver to be able to handle the webhooks from Azure and parse the messages before sending them to Kafka
  • Topcoder-X processor to be able to handle the Azure repo messages and also write back status comments and change tags on Azure
  • Topcoder-X UI to be able to set up Azure repos correctly, with webhooks and labels, and to handle the mapping of Azure user to Topcoder member for assignment and payment processing
There aren't requirements for what library to use when accessing Azure, but there appear to be NPMs available:

Expected functionality

Topcoder-X Receiver

In the Topcoder-X Receiver, in the utils folder, we have two classes - GithubEventDetector and GitlabEventDetector.  This challenge should add a third class called AzureEventDetector that can properly parse the events mentioned.  Note that pull requests don't have to be detected, as those aren't currently used in Topcoder-X.

Topcoder-X Processor

In the Topcoder-X Processor, we handle things in a couple of spots:
  1. In services, we have GithubService.js and GitlabService.js.  For this challenge, please add a similar AzureService.js
  2. In utils, we have git-helper.js, which uses both GithubService and GitlabService to handle things like creating comments, adding labels, and mapping users to TC handles.  For this challenge, we'll add additional support for AzureService.js.  It's fine to refactor this file to make it easier to add service integrations in the future.
Topcoder-X UI

In the Topcoder-X UI, we have GithubService.js and GitlabService.js in the services folder.  These classes handle getting team information for the Git Access Link functionality in the Topcoder-X UI.

In addition, in the ProjectService.js, we have functionality for adding labels and webhooks to existing repositories, as they are added to Topcoder-X projects.  We would like to expand this to handle Azure repos.  Feel free to refactor this functionality, as it's a bit confusing in the current ProjectService.js file.

Adding an Azure project to Topcoder-X should work just the same as it does for both Gitlab and Github, and the Git access links should work the same as well, if possible.

Proof of concept

This challenge is just a proof of concept.  Azure doesn't have the same "clean" mapping that Gitlab and Github do with labels, webhooks, etc.., so we're hoping the community can help us out a bit with investigating and trying things out to see what works best for Azure.  An example mapping is below, but this can be changed based on what's possible in Azure with it's API.



NOTE - DO NOT include any changes to README or config files that include any keys or secrets.  THIS IS A MAJOR REQUIREMENT.  A patch was inadvertantly applied last time that included a key and secret in the config file, which caused problems because the Topcoder-X repos are public.

Deployment guide and validation document


You must provide a README.md that covers:
  •     Local deployment
  •     Heroku deployment
  •     Configuration for the receiver, processor, and UI

A comprehensive Validation.md that covers:
  •  How to validate the individual fixes.  Please ensure that you address each individual bug ticket directly.  This needs to be comprehensive - a one-sentence description likely won't be enough.  Please provide screenshots as well.

Validation video / screencast

    No video is required for this challenge

���What To Submit



Final Submission Guidelines

Please see above

ELIGIBLE EVENTS:

2020 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30121202