Status: Resolved (View Workflow)
It would be nice if Gerrit trigger plugin included the message a comment-added event results in as an environmental variable. It looks like that "gerrit stream-events" includes comment texts as part of the data that it provides. But currently there doesn't seem to be a mechanism to get the exact comment that this event is triggered upon. Only the change reference is included and from it it's just a guess that which comments triggers this event, as those comments need to be separately fetched from Gerrit by using GERRIT_PATCHSET_REVISION environmental variable and there can be new comments added between the triggering and actually fetching the list of comments that a patch set has.
This should be easy enough to implement (in particular if it is acceptable to use the option for commit message encoding to also decide on the encoding for the comment text), although I'm not sure how to test this (easily) beyond compiling. I can create a pull request once I find the time.
My use case for this functionality would be to have a pipeline build that does some decisions on what/how to build things, based on the comment added in Gerrit.
+1 for this issue, would be quite useful, especially in conjunction with the ability to rejex match on the comment text. For example, I'd like to be able to use a special gerrit comment to kick off stress test builds on particular patches while not doing it for all.