String interpolation with Ruby for comments
In order to hint which missed:xx.x
should be used as mentioned in https://gitlab.com/gitlab-org/gitlab-triage/issues/62#note_93574133 we'll need to have some way to use the milestone from the resource.
We have placeholders like {{author}}
, and we could also add Ruby string interpolation with the same syntax. So we could write #{milestone}
to access the milestone object implemented in https://gitlab.com/gitlab-org/gitlab-triage/merge_requests/45
Then we could write the comment like:
comment: |
Please add ~"missed:#{milestone.title}" label
When the milestone title is 11.2
, it would be evaluated to: Please add ~"missed:11.2" label
. Since we have quick actions, we don't even need to extend this to the labels:
action, we could as well just write:
comment: |
/label ~"missed:#{milestone.title}"
to add a dynamic label.