Google Summer of Code 2017 Work Product Submission



coala

Naveen Kumar Sangi

I’m a final year student of Computer Science & Engineering at National Institute of Technology, Durgapur, India. I participated in GSoC and worked with coala and GitMate to build the second version of GitMate to help developers speed up their review process. I also worked on improving and extending support for GitLab on IGitt, developing an algorithm to detect duplicate issues and implemented several plugins for GitMate.


Patches Tarball


SHA-256:

320d138d599bc8fe6cb7a109f1f78f0dc24f30dc1c8fcf3f18240d32cd4573ca

Bonding

Phase 1

Phase 2

Phase 3


Links to commits and repositories I've worked on:

Repository Link to Commit/s Description
g  gitmate-2 View

Add commit reacknowledge plugin for GitMate.

g  gitmate-2 View

Add auto rebaser plugin for GitMate.

I  IGitt View

Implement unified_diff property in IGitt Commit interface.

g  gitmate-2 View

Add stale pull request reminder plugin for GitMate.

g  gitmate-2 View

Add stale issue reminder plugin for GitMate.

g  gitmate-2 View

Add pull request approver plugin for GitMate.

g  gitmate-2 View

Add issue-pull request sync plugin for GitMate.

s  social-core View

Support for Bitbucket OAuth token refresh in psa.

g  gitmate-2 View

Add external request recorder in GitmateTestCase.

i  issue-dupe View

Duplicate issue detection algorithms.

i  igitt-django View

Create new django app to store IGitt objects.

g  gitmate-2 View

Add python social authentication with openid for GitMate.

g  gitmate-2 View

Add risk checking plugin for GitMate.

g  gitmate-2 View

Add issue labelling plugin for GitMate.

g  gitmate-2-frontend View

Improved preloader visualization on GitMate-2 frontend.

I  IGitt View

Commits 18748ea through fa6f21e: Implementing GitLab interfaces.

c  coala-incremental-results View

Create a script to run incremental static code analysis on git repositories.

g  gitmate-2 View

Add startplugin subcommand for GitMate.

d  documentation View

Add docs on how to deploy GitMate on your own server.

r  result-bouncer View

Automate docker image build for result-bouncer.


Extending GitMatev2.0 to support GitLab and Bitbucket

About the product

GitHub, GitLab and BitBucket support webhooks for common events like opening/closing/commenting on Merge Requests, creating Issues, etc. These webhooks could be configured for automated response using their own API’s for comments, tests/integrations, etc. GitMate merely acts as a tunnel for these events and responds accordingly. The interface for these API’s is held by its wrapper library, IGitt.

Aim of the project

This project is aimed at extending the support for GitMate to GitLab and BitBucket repositories. This adds up to unified and automated code analysis and maintenance on the big three code hosting platforms.

Implementation

This project consists of implementing GitLab and BitBucket interfaces in IGitt, following the already implemented GitHub’s convention, while simultaneously creating webhook responders and tasks for the same on gitmate-2.

Extending plugins is quite easy on gitmate-2 following gitmate_testplugin as an example, thanks to its plugin-based architecture.

Difficulties

During the initial phases of GSoC, the project grew rapidly with the advent of new plugins, support for GitLab and all. But it took a sharp turn when it became clear that Bitbucket could not be supported because of incomplete API endpoints from their side. We took it to advantage to develop other plugins, duplicate issue detection with TF-IDF vectorization algorithm, and igitt-django.

Overall Experience

Considering the quality time spent on interactive plugins, developing a good backend architecture and providing a wider support for Git based hosting platforms like GitHub and GitLab, it was all-in-all a wonderful experience with my mentors. Both Lasse Schuirmann and Fabian Neuschmidt, were really helpul and available at all times. I’d definitely continue working with them after the project finishes and we’re looking forward to a much better GitMate with support for caching IGitt objects out of the box.

Work to be done

Improving the webhooks and gathering reviews and user feedback for GitMate-2. Developing a full fledged automated storage system for IGitt objects with support for django. This way we could minimize the number of external requests.

Deploying GitMate at a larger scale and expanding the community are the primary concerns. Extending support to Bitbucket as soon as they provide a good API system.