How to turn off the email notification during the commit review process?

84 views
Skip to first unread message

汪正东

unread,
Aug 24, 2023, 2:34:05 PM8/24/23
to Repo and Gerrit Discussion
When the developer pushes the local code to the server for review through git push origin HEAD/refs/for/[branch], the mailbox bound to his account will receive corresponding notifications in each link of the review. This will lead to a large amount of mail exchanges, especially when some mailbox services are charged according to the capacity, it will cause a large waste.
However, the Gerrit server needs to configure the smtp server when the system is deployed, otherwise the user cannot be authenticated by email after registration.
So how to turn off the email notification during the review process under the premise of ensuring the basic functions of Gerrit?

Sven Selberg

unread,
Aug 25, 2023, 2:14:21 AM8/25/23
to Repo and Gerrit Discussion
Notifications can be turned off on an individual level:
User Settings > Preferences > Email Notifications = None 

If you want to block all notification globally by default, it's not very well documented but defaults for preferences that apply for all accounts can be configured in the refs/users/default branch in the All-Users repository.
https://gerrit-review.googlesource.com/Documentation/config-accounts.html

/Sven

Sven Selberg

unread,
Aug 25, 2023, 2:18:43 AM8/25/23
to Repo and Gerrit Discussion
And there's off-course a REST endpoint to set global defaults for preferences which might be nicer to use...
https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#set-user-preferences
 


/Sven

Sven Selberg

unread,
Aug 25, 2023, 2:20:13 AM8/25/23
to Repo and Gerrit Discussion
Reply all
Reply to author
Forward
0 new messages