Particularly, "Auditors", "Fixes" and "Depends on".
- Mentioned In
- T13057: Formalize "reverts" and "resurrects" between revisions
Z1336: General Chat
D16432: Removing deprecated method calls
Q396: How are you suppose to work with Phabricator when you have revisions based on revisions? (Answer 382)
T10267: Ancestral review dependency
T9965: Don't require newline for Differential Revision autoclose magic
Q102: Specifying auditor for commit (Answer 125)
Q102: Specifying auditor for commit (Answer 124)
Q65: How to manage Differential revisions spanning multiple repositories? (Answer 112)
T9200: Inspect branch name in mercurial repositories for Refs
Q19: Magic in commit messages (Answer 98)
T9072: Arc diff support to set the dependent status
T8318: Diffusion closes tasks when commit message has a line ending in "fixes" followed by a line beginning with a Txxx task reference
T8168: Tagging Diffusion Commit should link to respective Maniphest Task
T4330: Associate Git commit to Maniphest task
- Mentioned Here
- T11934: Make email commands ("/subscribe") work in all contexts, including Conpherence ("/me")
T13057: Formalize "reverts" and "resurrects" between revisions
T4767: Autoclose and "Fixes/Ref" are too difficult for users to debug
T4036: Crosslink object if mentioned somewhere
Special commands in comments can cause various effects, like closing a related task when a commit is pushed.
Attaching to Tasks
Attach to a task with "Ref", "Refs", "References" or "cf." These are hard-coded and case insensitive. This works in Differential and commits. For example, writing Ref T123 in a revision summary will attach that revision to task T123.
You can specify several tasks, optionally using commas: Ref T123 T124, or Ref T123, T124.
You can optionally add a noun, like Ref task T123. See "Close Related Task", below, for details.
Attaching to Tasks using Branch Names
In Differential, revisions updated with a diff from a branch starting with T123 (for example, T123 or T123-colors) will be attached to the corresponding task. This requires you to use arc (not just copy/paste diffs) so that branch information is preserved.
Close Related Task
Close a related task with syntax specified in maniphest.statuses. Each task status can specify prefixes and suffixes. These are used in the form <prefix> <optional noun> Txxx [optional more Txxx] <optional suffix>. For example, Closes T123 or Closes T123 as Wontfix.
By default, the prefixes are: closed, closes, close, fix, fixes, fixed, resolve, resolves, resolved, wontfix, wontfixes, wontfixed, invalidate, invalidates, invalidated, spite, spites, spited.
By default, the suffixes are: out of spite, as spite, as invalid, as wontfix, as resolved, as fixed.
The prefix (and, optionally, the suffix) select which status the task will be closed with. For example, Invalidates T123 closes T123 as Invalid. When a phrase has both a prefix and a suffix, the suffix wins. For example, Invalidates T123 as wontfix closes T123 as Wontfix. The intent is to allow common prefixes like "closes" to be bound to a generic closed status while still allowing the relatively natural construction "closes X as invalid" to work as expected.
You can change these in maniphest.statuses. They are case-insensitive.
You can optionally use a noun after the prefix. The supported nouns are: task, tasks, issue, issues, bug, bugs. These are hard-coded and case insensitive. These also work with the "Ref" syntax. For example, Fixes bugs T123, T124.
These phrases work in commits. In Differential, they are recognized, but just work like "Ref". The intent is to allow you to write Fixes T123 in a commit message, have it reviewed, and then have the task automatically close on commit.
Only the "depends on" prefix is recognized. This is hard-coded and case insensitive.
These nouns are recognized. They are hard-coded and case insensitive: diff, diffs, change, changes, rev, revs, revision.
You can specify a list of revisions, like Depends on D123, D124.
This doesn't do much right now, but is recognized.
These hard-coded, case insensitive prefixes are supported: revert, reverts, reverted, backout, backsout, backedout, back out, backs out, backed out, undo, undoes.
These hard-coded, case insensitive nouns are supported: commit, commits, change, changes, changeset, changesets, rev, revs, revision, revisions, diff, diffs.
See T4767 for status on making these easier to debug.
- T4036 will make mentioning objects (as T123) anywhere generate a lightweight crosslink.
- After T4767, some debugging information is available in https://secure.phabricator.com/book/phabricator/article/diffusion_autoclose/.
- After T4036, mentioning an object in a comment somewhere else will add a "<user> mentioned this in <thing>." note to the mentioned object's log.
Hey guys, where should I hook my custom parser if I need to add any additional behaviour on 'CodeReviewed' keyword in commit message due to parsing from repository?
Actually I need to mark commit as audited when commit message contains previously specified string.
Many thanks in advance.
One possible approach for this is:
- Implement T11934.
- Implement !fixes T123 as alternative syntax for all the magic supported here.
- Add a "command reference" button to the remarkup area.
- List both the !fixes T123 and Fixes T123 variations in the help.
Beyond that, T13057 is likely to add a "resurrects" syntax shortly, and expand the existing "reverts" syntax to accept revisions.