Challenge Overview
1.0. Introduction
Topcoder would like to improve the product development team's ability to deliver quick, stable releases across all key applications/services of the platform. This includes making it easy for the community to quickly participate in design, development, qa, devops, and release efforts.
2.0. Challenge Overview
The legacy online-review website is fairly complex to setup locally and there exists development environment setup instructions as well as docker containers to make first-time deployment easy for members. We intend to migrate the codebase from svn to git.2.1. Requirements
Online Review (OR) was built using several Java components. Each component is fairly self-contained (with automated tests) and is organized in its individual repo in svn. Importing more than 70 components into git would be too tedious to do by hand which is why we need your help.Your task is to write a script using JavaScript on node.js that can interact with the GitHub (GH) API to perform the following actions for a GH organization:
1.0. use the GH repos create API to create a new git repo
2.0. use the GH source imports API to import code from svn into each git repo
2.2. Background
The OR build script relies on the presence of the svn client on the execution path for builds to complete successfully. As part of migrating OR to git, the build script will undergo some gradual refactoring. The first step is to import all svn repos into git; update svn URLs to use git URLs and update the build script to be SCM agnostic.2.3. Tasks
Your responsibilities in this challenge are as follows:1. Create 3 private svn repositories on any free svn hosting provider of your choice.
2. Create an XML file formatted exactly like components.xml that lists the svn repos you created. See the forum for an example.
3. Write a script that can iterate through the entries in the XML file and perform the actions outlined in 2.1.
4. Ensure that all activities are properly logged to console and to file.
5. Provide markdown formatted instructions explaining how to build and run the github-import-script which you built in this challenge.
6. In your final submission, please clearly indicate the git commit hashes used in all aspects of your submission.
7. The svn and git credentials should be configured in an .env file and the script should support adding a prefix (e.g tc- to autopilot).
Please endeavour to clarify any requirements that are unclear and avoid making excessive assumptions in your implementation.
3.0. Repositories
3.1. Input Branch
tc-online-review master (java)https://github.com/topcoder-platform/tc-online-review
3.2. Output Branch
tc-online-review-github-import master (node.js)https://github.com/topcoder-platform/tc-online-review-github-import
4.0. Deployment
The platform might be a bit daunting to deploy locally for first timers, so it is important to ask for help early on the forums.4.1. Prerequisites
Before you begin, you may need to have the following tools installed:
- node.js v5.x+
npm v3.x+
Final Submission Guidelines
Please see the final submission guidelines above.Reviewers please take note that the review duration is not the default duration so plan your time accordingly.
Also, ensure that you test submissions on different platforms.