Key Information

Register
Submit
The challenge is finished.

Challenge Overview

  • Target environment: GitLens (VSCode Extension)

  • Basic Requirements: Extend GitLens to add required features, some features should be added via the BitBucket API.

Project Background

Git is the leading open source SCM (Software Configuration Management), our clients like the popular Git Diff VSCode extension GitLens for SCM. However, GitLens lacks some features that the clients need, so they want to add the missing functionalities into it. We would like to make this tool a much more valuable code review tool.

Technology Stack

Git

GitLens (VSCode Extension)

  • Electron

  • NodeJS

  • TypeScript

BitBucket API

  • RESTful API

Individual requirements

Codebase: please work on my forked repo https://github.com/billsedison/vscode-gitlens/tree/tc-dev

tc-dev branch, the latest commit hash 31b657033c01951614fff7f165687fa1a986fa8a

In the first two challenges, we have extended the GitLens to add the following functionalities

  1. Select multiple commits and aggregate diff

  2. Filter commits by date (All dates, start and end date, last 24 hours, last 7 days)

  3. Combine filters (filters by branch, author, date, message regex, commit SHAs)

  4. Refactored a new UI.

Here are the challenge links of the first two challenges for your reference.

Code Challenge: https://www.topcoder.com/challenges/30070639/?type=develop

F2F Challenge for cleanup: https://www.topcoder.com/challenges/30071171/?type=develop

In this challenge, we need to extend the GitLens further to add comments by BitBucket API.

Comment on the aggregated diff

Note you should log in to the BitBuket then you will be able to comment.

1. Comments on any line of code

We need to place comments on any line of code in any file of the aggregated diff selection. Specifically, the functionality includes

  • selecting a file on the aggregated diff

  • selecting any line of code of that file

  • to add/edit/delete comments

  • to reply comments

BitBucket provides a similar functionality, it supports to add comments on any line of code of a file. Here is the demo video of this functionality on BitBucket for your reference.

2. Comments on the file level

Additionally, we need to place comments on the entire file of the aggregated diff, not tied to any specific line of code.

BitBucket provides a similar functionality. Here is the demo video for your reference.

This two functionalities can be implemented by BitBucket API, please read the API usage on https://developer.atlassian.com/bitbucket/api/2/reference/search?q=comments

Some tips:

Note on BitBucket API level, comments are tied to a specific commit. See

So you can’t use these API directly. But for an aggregated diff we are showing all the changes to files across multiple commits. When we select a line that is changed we can backtrack to find the last commit for that file that changed that line -- that is the commit we will tie the comment to.

For the file level commits we can do the same, backtrack to find the last commit in the changeset (aggregated diff) and append the comment for the entire file to that commit.

Note we are not sure how to tie comments to the file level as opposed to the line level, but since the Bitbucket UI can do this, and that UI uses the same REST API that we will use, so we think it’s possible to implement it. You are required to investigate the detailed solution and document it in your README.



Final Submission Guidelines

- A Git patch against the latest commit hash of the tc-dev branch of the repo.

- A detailed README.md to show how to apply your patch and run the modified GitLens.

- A video to verify your modified GitLens meets all requirements. If you are not comfortable with spoken English you may feel free to annotate your video with text.

ELIGIBLE EVENTS:

Topcoder Open 2019

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30071795