What about Herald "Add message" variables?

Hello everybody! :slight_smile:

Is there an existing feature request about variables in Herald messages?

For example, when someone create a Differential revision, he may want to see a message like:

Be bop be bop. I’m building this revision!
If I success try http://blabla/builds/latest-D1234.apk

Maybe generated from this:

Be bop be bop. I’m building this revision!
If I success try http://blabla/builds/latest-${buildable.revision}.apk

I now used ${buildable.revision} for this example because is a known term from Drydock.

Honestly it’s not that important, but I’m curious to follow any existing Task about this, if any :hugs:

Even if maybe it’s the building system that should add these kinds of comments using differential.revision.edit conduit API, and not Herald.

Herald is very unlikely to ever support variables (or loops, or functions, etc).

You can technically write a custom HeraldAction that supports variables (copy HeraldCommentAction to get started) but I would strongly resist ever bringing this upstream.

If you need complex behavior like this, you should use Webhooks or Harbormaster to call an external service, then have your service use Conduit to make updates to Phabricator (like posting comments) if necessary.

If you’re performing a build, use Herald to trigger a build in Harbormaster. If you aren’t building in Harbormaster + Drydock, have your build system use Conduit to report build results.

1 Like