At coala we use GitMate as an automatic reviewing tool to reduce the time spent with simple mistakes like trailing whitespaces and lines that are too long. We also use it to gate merging pull requests before the commits are approved by a maintainer. All these features make dealing with the growing amount of pending pull requests easier and allow us to focus in the important aspects of the code and skip the manual scrutinizing of simple formal errors. It essentially serves as a CI that comments issues directly in your Pull request for you to fix. The only problem with it is, that it only supports GitHub at the moment.
Most of coala's repositories are located at GitHub but some are with GitLab. As GitMate and it's git wrapper IGitt will be released as open source, this is the perfect opportunity to not only support all coala repositories but enable GitMate support for all GitLab users. To complete the big three git hosting providers, support for Bitbucket has to be added. This way most developers using git should be able do benefit from GitMate.
GitMate is a plugin system for handling events from a Git hosting platform like GitHub. Eventually it will support automatic code review via coala, just as the prototype does. It is currently developed as a plugin platform so plugins can be reused for any git hoster and just plugged into hooks, similar to the GitHub webhooks.
GitMate was originally written using flask microframework and was never opensourced. A newer opensource version of GitMate, is being actively developed at gitmate-2, with a configurable plugin architecture. Some of GitMate's plugins are welcome commenter for PRs, automatic issue labelling based on keywords, PR labelling based on size, pending/WIP indicator for PRs, static code analysis per commit, hot spot identifier based on Google's bugspot algorithm, etc.
The goals of this project are:
- Add GitLab and Bitbucket support for IGitt
- Add GitLab and Bitbucket support for all existing hooks in GitMate
- Extend and rewrite gitmate with django web framework.
Project on Google Summer of Code 2017 website
Milestones
PREPARATION/BONDING
Migrate existing handlers for GitHub to gitmate-2 as plugins.
Related issues: code analysis, issue labeller and bug spotter.
Add unit tests and provide statement coverage for all existing plugins.
Related issues: unit-tests.
A clear concept exists for which hooks need which GitLab API endpoints.
Related issues: GitLab doc.
A clear concept exists for which objects in IGitt need to be extended or written.
CODING PHASE 1
GitLab support for IGitt is done, documented and fully tested.
Related issues: IGitt GitLab and IGitt GitLab tests.
Extend webhook responders in gitmate-2 for GitLab and test them.
Related issues: gitmate-2 GitLab and gitmate-2 GitLab tests, docs.
A clear concept exists for which hooks need which Bitbucket API endpoints.
Related issues: Bitbucket doc
A clear concept exists for which objects in IGitt need to be extended or written.
CODING PHASE 2
Bitbucket support for IGitt is done, documented and fully tested.
Related issues: IGitt Bitbucket and IGitt Bitbucket tests.
Extend webhook responders in gitmate-2 for GitLab and test them.
Related issues: gitmate-2 Bitbucket and gitmate-2 Bitbucket tests, docs.
If the API was extended, the other supported platforms on IGitt serve the new features as well.
Discuss new ideas on creating further plugins for gitmate-2 and create mocks for them.
Related issues: New plugins and mocks.
CODING PHASE 3
GitHub, GitLab and Bitbucket support exists for all hooks on GitMate.
Related issues: multi platform
Optimize and refactor the code so far.
Related issues: code optimization
Realtime testing and bug squashing.
Related issues: realtime tests and bug fixes
Full documentation on gitmate-2 and IGitt.
Related issues: Documentation