Commit email notifications


#1

We are using phabricator and git repositories to manage our code and project.
I have a question regarding commit email notifications.

Whenever somebody commits and pushes changes to repository, only he gets diffusion email notification. If I change code and push, only I get email, if some other person pushes changes only he gets notification.
Is this default behavior? What do I have to do to send email to all project members?

Most of our installation is using default configuration.

Thanks.


#2

Yes, that’s the default setting.
The logic is that for every object (in this case, Repository and Commit), we only notify (email) the “interested” parties - those that either Subscribed to the object, or mentioned, or otherwise have some specific relation (like creating the object, assigned to task, etc).

Repositories do not support Subscribe feature.

You can implement this using Herald rules:

  • Create a Project
  • Add members to Project
  • Create Herald rule for Commits (not “hooks”) -> Global rule -> conditions… -> Apply these actions “only the first time”, actions: “send email to” and select the Project as the target.

Then users can join the project to get notified about new commits.


#3

Thanks Aviv for the information.

With the solution you mentioned as I understand, I need to create herald rule for each repository. I have multiple projects and their respective repositories. So I need to create separate rule for each of them.
Is there any way to do this with single rule, something like parameterizing the rule? Instead of specifying the project name in “send email to” can it derive from repository or evaluate from expression to identify interested project/people?

Thanks again.


#4

Unfortunately, there’s no way to parameterize rules; The closest you can get is 'if project is tagged with Project X, email Project X", for a specific project X.

A similar alternative is to use Owners, which allows for a similar features (including “Auto-review: Subscribe to all changes”), and allows both cross-repository, or filtering by path inside a repository.

It might make sense to make Repositories subscribable, so this action can be built in - see https://phurl.io/u/feature on “how to request a feature”.
I don’t remember anyone really asking for this feature, so maybe it’s not really that useful? I would imagine that either people work in small teams, where everybody sort of knows who committed, or large teams, where this will be very noisy.