Tip: Stash missing feature: default reviewers list

In the company I am currently working in, we are using Atlassian Stash. Stash is a web UI for managing GIT repositories in an enterprise context. I really like this tool, but it has some limitations. One of them is particularly bothering me.

Pull request's default reviewers list

We are working with the git feature branch workflow, pull requests and code reviews. When doing a pull request in Stash, we must specify each reviewer's name. It can be quiet bothering when working in a big team.

There is no option in Stash to configure a default reviewers list. Well, there is a feature request opened on Stash's JIRA (STASH-2924: Default reviewers for a repository) but apparently Atlassian is not willing to do anything about it. Some people are suggesting the installation of a plugin, but you need admin access to the Stash instance to install plugins...

My solution: Bookmarklet !

I really like bookmarklets. They allow you to execute some Javascript on any page, within (almost) any browser. After digging into how the "New Pull Request" page works, I came up with this simple Javascript, which allows you to add a list of people as reviewers of a pull request in just one click.

javascript:void(jQuery('#reviewers').val("username1|!|username2|!|username3"))

That's it! You should replace usernameX with the usernames of people from your team and add that as a bookmark in your browser's toolbar.

Please note that visually, nothing is happening. You should not interact at all with the "Reviewers" input.

Commentaires