Details
- Reviewers
amckinley - Commits
- rPc9a0d68340ba: Allow Herald rules to add comments
- 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.
Diff Detail
- Repository
- rP Phabricator
- Branch
- herald1
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 18939 Build 25540: Run Core Tests Build 25539: arc lint + arc unit
Event Timeline
What do these herald-generated comments look like? Are they attributed to the user who created the Herald rule? Looking towards the future, should we (perhaps insanely) add an option that lets you specify the author as any bot user visible to the user creating the Herald rule?
They currently say "Herald added a comment. [ View Transcript ]". You can click the transcript link to puzzle out exactly why the comment was added, although it may take a bit of work.
Global and Project rules (which are the only rule types which can use this action -- for now, at least) don't currently have an owner, so we couldn't directly attribute this stuff to a first-class owner. (They did in the past, sort of by accident, but that ran into a bunch of murky stuff when users were on vacation or left the company and their global rules were misbehaving.)
We could let you attribute this action to a user explicitly instead, although all users can always see all other users today and I'm a little hesitant to conflate "see" with "edit on behalf of, if the target is a bot" -- I don't think there's any real peril there, but it's a bit of a mess if we, e.g., eventually lock bots down to specific owners and have to try to migrate rules to be consistent.
If there's ambiguity/confusion, some thoughts on ways to approach it are:
- tell installs to toughen up and use hooks/extensions/anything but this to solve these problems in a real way, using an actual bot with a real API key to get proper attribution and full edit capability; or
- maybe do something dumb like automatically prefix all comments with "This comment was added by {H123}: ..." to more explicitly attribute comments.
But I think you can "solve" this "problem" by just adding more text to the comment which explains what's going on, and this isn't materially more bad than using "Add comment..." in the first place.
Philosophically, I think this isn't the best solution to any problem we've seen users report, it just feels excessively paternalistic to refuse to implement it since I don't think there's much real support/technical/product risk, and the limitations should (hopefully?) be pretty self evident.
(My biggest fear on this is that we get requests for variable replacement/templating.)