An email server must be configured in Stash for email notifications to be sent. See Setting up your mail server. Note that if the mail server fails, notifications will be dropped. See also HipChat notifications.
Pull request notifications
Stash sends email notifications to the watchers and reviewers of a pull request when the following events occur:
|Pull request event||Notification|
|A reviewer is added
|A comment is added
|A comment is edited
|A comment is replied to
|A commit is made to the source branch||BATCHED|
|A pull request is opened||IMMEDIATE|
|The pull request is approved
|The pull request is merged||BATCHED|
|An automatic merge fails|
|The pull request is declined||BATCHED|
|The pull request is reopened||
BATCHED or IMMEDIATE
By default, email notifications are batched. However, in the following situations notifications are sent immediately:
- When a pull request is first opened, notifications are immediately sent to the reviewers.
- When a pull request is reopened, notifications are immediately sent to the reviewers who have opted in for immediate notifications.
- When someone is added as a reviewer to a pull request, a notification is immediately sent to them.
- When someone is mentioned in the description of a pull request, a notification is immediately sent to them.
You can change your personal account settings (on the Notification settings tab) so that you get notifications immediately.
You don't receive notifications for events you initiate yourself. See also Using pull requests in Stash.
Batched email notifications
Stash sends email notifications to:
- the watchers of a pull request, when certain pull request events occur,
- those who are mentioned in pull request descriptions or comments,
- comment and pull request authors when their comments get liked.
Notifications are aggregated by user for each pull request and are emailed in a batch. The batch gets sent if things go quiet for a while (10 mins by default), or when the oldest notification gets 'stale' (30 mins by default), whichever comes first.
By default, email notifications are batched. However:
- You can change your personal account settings (on the Notification settings tab) so that you get notifications immediately.
- A Stash admin can configure the period of inactivity and the staleness timeout period in the Stash config properties file.
- A Stash admin can change the notification mode for the Stash instance to 'immediate' using a system property, but users can still opt in for batched notifications.
Using 'mentions' to notify someone
From Stash 2.0 you can use 'mentions' to notify another Stash user about the pull request description or comment you are writing. Stash sends an email to that person – the emails are batched if they have opted for batching in their personal account settings.
To use mentions, simply start typing '@' and then the users display name, username or email address, and choose from the list that Stash offers. You can use quotes for unusual names, for example if it has spaces. Use Control-Shift-P or Command-Shift-P to preview the mention.
Was this helpful?
Thanks for your feedback!