Key Information

Register
Submit
The challenge is finished.

Challenge Overview

 
  • Target environment: JIRA, Git, NodeJS CLI tool

  • Basic Requirements: Build a NodeJS CLI tool to generate the report for JIRA.

Project Background

Cargo-NET is a CLI (command line)  tool that can take 2 points in git history (like two tags, commits etc), aggregate the commits within, find all Jira work items listed in the commit messages. 

For each completed Jira issue, the tool should extract a report that contains the changelogs (commit messages) included in the release (since the last release).

For each Jira issue that is not completed yet, the tool should extract a report that contains a list of issues Ids and links to the issues that need to be reviewed.

 

Technology Stack

Individual requirements

In the previous challenge, we implemented the main structure of the CLI tool with the local git support. In this challenge, you are required to implement the remote GitLab repo support. 

Unlike the local git support, to support the remote GitLab repo, all operations should be done by invoking GitLab APIs.

We are providing a JIRA sandbox for you to work on, the link of the JIRA sandbox and the credentials are provided in the forum.

We also provided a list of git repositories for you to test, 

 

The code base of the existing CLI app is https://gitlab.com/tc-cargo-net/cargo-net-cli.git

If you can’t access these gitlab repositories, you can use the Topcoder-X link provided in the forum to grant yourself access.

 

1. Code structure (VERY IMPORTANT)

The existing CLI app is already managed by Lerna split in the following modules

  1. CLI app: @cargo/cli

  2. Jira service lib: @cargo/jira

  3. Local git repo analysis lib: @cargo/local-git

  4. Report generator: @cargo/report-gen

In this challenge, you need to add a new module @cargo/gitlab to support the remote GitLab repo.

 

Similar to the existing modules, @cargo/gitlab module should also the interface to interact with other modules. Specifically, it should support

  • Switch between git branches

  • Return git log messages in a given range, please note if the given range is large enough, you might need to call the APIs multiple times due to the pagination limits.

  • All these should be done by invoking GitLab APIs.

 

The @cargo/gitlab and @cargo/local-git should expose the same interface and be interchangeable. If you think the interface of @cargo/local-git is not designed properly, feel free to update.

Please keep other modules as is and make sure your @cargo/gitlab can work with the other modules as the same as @cargo/local-git

2. Generate report and CLI usage

 

For the remote git repo, we don’t need to clone it to local, so to generate the report, we need to add --remote-url <Remote Git Repository> --target-branch <branch> parameters.

If --target-branch is not provided, then targets to the default branch.

Here are some examples

 

cargo-net --start-tag="REL_1.0.0-256" --end-commit="HEAD" --output report.json --remote <Remote Git Repository> --target-branch <branch>

 

cargo-net --start-tag="REL_1.0.0-256" --end-commit="dc86fe" --output report.json --remote-url https://gitlab.com/tc-cargo-net/git-amend.git --target-branch master

cargo-net --start-commit="e965bf" --end-commit="dc86fe" --output report.json --remote-url https://gitlab.com/tc-cargo-net/git-amend.git --target-branch master

cargo-net --after="2019-02-15" --before="2019-04-15" --output report.json --remote-url https://gitlab.com/tc-cargo-net/node-glob.git

 

3. Unit test

You should write Unit Tests in mocha and chai for the @cargo/gitlab module

 

Important notes

  1. If you have any questions, feel free to ask in the forum. Any assumption without approval won’t be accepted.

  2. Please consider all the possible errors when calling the GitLab API and handle the error gracefully.

  3. If the GitLab repository requires authentication, you should use the inquirer library to input credentials.

  4. Please keep the existing functionalities work well.

  5. Please keep the tslint config and tsconfig.json as is.

  6. Please keep the structure of the JSON as is.



Final Submission Guidelines

 

Please submit the following items in a zip archive. 

  • A git patch against the commit hash 8ef0c4487de7eaf224de0e6e0aa230891c9279b0 of https://gitlab.com/tc-cargo-net/cargo-net-cli.git master branch.

  • The updated README.md to describe how to build, deploy and run of the CLI. Also, include how to run the simple script to convert the JSON report to HTML.

  • A separate document to verify your CLI tool working as expected.

  • A video to verify your CLI tool meets all requirements. If you are not comfortable with spoken English you may feel free to annotate your video with text.

  • Some sample reports in JSON and the corresponding converted HTML pages.

 

 

ELIGIBLE EVENTS:

Topcoder Open 2019

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30095265