HomePhabricator

Disable mentions in nonpublishing repositories

Description

Disable mentions in nonpublishing repositories

Summary:
Ref T6516. Although this behavior is somewhat-arguable as desirable, I think it's less surprising and more consistent to disable mentions when a repository is publishing.

In particular, if you import a repository developed on another Phabricator install, this stops all the T123 in commit messages from creating mentions on your unrelated T123 tasks.

We already disable autoclose, so Closes T123 and Ref T123 already have no effect, but a bare T123 would generate a mention. Likewise, @epriestley would generate a mention.

If you import such a repository and then update it periodically, updates will activate autoclose and publishing (if you didn't disable them), but presumably this will hit a couple of tasks and you'll go change the settings if you forgot.

At some point, we may have some kind of use case for separating the "publish" setting into a "publish" setting and a "this is a local repository" setting. For example, if you work at Widget Corp, want to import Phabricator locally, and want to write Herald rules against it, you can't currently configure the repository to let you do all of this. But we haven't actually seen a use case for this yet.

Test Plan:

  • Pushed some commits with bare T11, saw mentions.
  • Disabled publishing for the repository, pushed some commits with
  • Imported a bunch of commits without seeing pipeline failures.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6516

Differential Revision: https://secure.phabricator.com/D11966