One of my development teams wants to be able to have certain people be notified (watchers) for a pull request BUT NOT by making them reviewers. I don't know that the necessary care about it being automatic, but they'd like to be able to add watchers when submitting a pull request.
Does anyone know if there's a way to do this out of the box or with a Stash add-on? We're on 2.12.3 by the way.
There is no built-in functionality or existing plug-in for this, but you can create a very simple plugin to listen to PullRequestOpenedEvent
and add the required people as watchers. More info here.
The main part of the code would be something like this:
@EventListener public void OpenedListener(final PullRequestOpenedEvent openedEvent) { Set<Watcher> watchers = openedEvent.getPullRequest().getWatchers(); watchers.add(...) }
[I am not completely sure about the watchers.add() part (whether this would actually affect the pull request). If somebody has actually tried this, please confirm/correct.]
The use case for this is that pull requests can be used to learn/teach other team members about certain things to look out for when coding as well as being involved in making comments to the changes. It would be great to allow watchers/non-reviewer participants to be added during pull request creation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.