Register
Submit a solution
The challenge is finished.

Challenge Overview

Challenge Objectives 

  • Target environment: JIRA, Git, NodeJS CLI tool

  • Basic Requirements: Build a NodeJS CLI tool to generate 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 challenges, we implemented the main structure of the CLI tool with the local git support and remote Git repos support. Now the CLI tool supports

  • Local Git repo

  • Remote GitHub repo

  • Remote GitLab repo

  • Remote Bitbucket repo

 

In this challenge, you are required to enhance the report details and improve the unit test coverage.

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

 

GitHub (all GitHub repos are public, but private GitHub repos are also supported)

 

Bitbucket (all Bitbucket repos are public, but private Bitbucket repos are also supported)

 

GitLab (All are private repos)

 

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

 

If you can’t access the codebase or the GitLab private repos, you can use the Topcoder-X link provided in the forum to grant yourself access.

 

1. Report structure improvement

 

1.1 Distinguish statuses of JIRA issues

 

Currently, we only categorize the JIRA issues to

  • Completed issue: if the status of the JIRA issue is DONE.

  • Incompleted issue: if the status of the JIRA issue is not DONE.

 

But the statuses of JIRA issues include

  • NEW

  • DEFINED

  • IN PROGRESS

  • DEV COMPLETE

  • TEST COMPLETE

  • DONE

 

You are required to improve the report structure of JSON to distinguish different statuses of JIRA issues rather than just completed issue/incomplete issue.

 

You should update the existing JSON Structure.md  too.

 

1.2 Make JIRA story properties and git log fields configurable at runtime

 

Currently, the JIRA issue contains the following fields

 
  • id: Issue id

  • key: Issue key

  • link: Issue link

  • summary: Issue summary

  • issuetype: Issue type

  • status: Issue status

  • completed: Boolean flag indicates whether issue is completed

  • linkedIssues: Map of linked issues

  • subTasks: Array of sub-tasks

  • featureIssues: Array of issues in feature

  • logs: Array of commit logs

 

Where the git commit log contains the following fields

  • hash: Commit hash

  • date: Commit date

  • message: Commit message lines

  • author_name: Commit author name

  • author_email: Commit author email

 

You need to define a configuration file that includes that all the fields need to be shown in the report. The configurable file can be a JSON or YAML file.

 

Also, the JIRA statuses that would be included in the report should be configurable.

 

You need to add --fields-config <The path of the configuration file>  parameter to pass the configuration file to the CLI at runtime.

 

If --fields-config is not provided, then all fields are included in the JSON report file.


1.3 HTML report update

Currently, the HTML report only includes part of the fields of the JSON report, you need to update the HTML report to meet the following requirements

  • Each JIRA issue status should has its own tab button. Currently, it only includes two buttons (Complete, Incomplete)

  • In the HTML report, all the fields of JIRA issues and commit logs should be displayed. You can reorganize the layout of the HTML page freely, as long as it looks good (you should avoid horizontal scrolling). Some fields can be displayed via a popup/hover window.

 

2. Unit test coverage should be 100% 

Currently, the unit test coverage of some modules are not 100%, for the following modules

  • CLI app: @cargo/cli

  • Jira service lib: @cargo/jira

  • Local git repo analysis lib: @cargo/local-git

  • Remote GitLab repo lib: @cargo/gitlab

  • Remote GitHub repo lib: @cargo/github

  • Remote Bitbucket repo lib: @cargo/bitbucket

  • Report generator: @cargo/report-gen

 

You must ensure

  • % Stmts: 100%

  • % Branch: 100%

  • % Funcs: 100%

  • % Lines: 100%

  • No uncovered lines


3. 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. Remote GitLab repo lib: @cargo/gitlab

  5. Remote GitHub repo lib: @cargo/github

  6. Remote Bitbucket repo lib: @cargo/bitbucket

  7. Report generator: @cargo/report-gen

 

You should not modify the source code of the following modules (except for the unit test code)

  • Local git repo analysis lib: @cargo/local-git

  • Remote GitLab repo lib: @cargo/gitlab

  • Remote GitHub repo lib: @cargo/github

  • Remote Bitbucket repo lib: @cargo/bitbucket

 

You should not add any new modules or remove any existing modules.

 

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 keep the existing functionalities work well.

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

  4. The submissions will be reviewed by the copilot and the client together.



Final Submission Guidelines

  • A git patch against the commit hash a8dcddb9b048f4ab446aa88549f6e15b64d6d666 or later 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.

  • The updated JSON Structure.md to describe the updated data.

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

  • separate document to verify the CLI tool working as expected

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30098864