Allow Herald rules to add comments

Summary:
See PHI242. All use cases for this that I know of are pretty hacky, but they don't seem perilous, and it's easier than webhooks.

See P1895, T10183, and T9853 for me previously refusing to implement this since all those use cases were also pretty bad.

Test Plan:
  - Wrote a rule to add comments, saw it add comments.
  - Reviewed summary, re-edited rule, reviewed transcript to check that all the strings worked OK.
  - Wrote a new rule for a non-commentable object (a blog) to make sure I wasn't offered the "Add a comment" action.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18823
This commit is contained in:
epriestley
2017-12-11 11:33:15 -08:00
parent 60e5c0ec1b
commit c9a0d68340
8 changed files with 133 additions and 13 deletions

View File

@@ -37,6 +37,12 @@
padding: 2px 4px;
}
.herald-action-table td textarea {
width: 95%;
height: 8em;
padding: 2px 4px;
}
.herald-action-table td.target {
width: 100%;
}

View File

@@ -217,6 +217,11 @@ JX.install('HeraldRuleEditor', {
get_fn = function() { return input.value; };
set_fn = function(v) { input.value = v; };
break;
case 'herald.control.remarkup':
input = JX.$N('textarea');
get_fn = function() { return input.value; };
set_fn = function(v) { input.value = v; };
break;
case 'herald.control.select':
var options;