Resolve "Personalised Responses (comments)"
This implements support for placeholders in a simple way.
Supported placeholders are:
-
created_at
: the resource's creation date -
updated_at
: the resource's last update date -
closed_at
: the resource's closed date (if applicable) -
merged_at
: the resource's merged date (if applicable) -
state
: the resources's current state:opened
,closed
,merged
-
author
: the username of the resource's author as@user1
-
assignee
: the username of the resource's assignee as@user1
-
assignees
: the usernames of the resource's assignees as@user1, @user2
-
closed_by
: the user that closed the resource as@user1
(if applicable) -
merged_by
: the user that merged the resource as@user1
(if applicable) -
milestone
: the resource's current milestone -
labels
: the resource's labels as~label1, ~label2
-
upvotes
: the resources's upvotes count -
downvotes
: the resources's downvotes count
Use placeholders with double curly braces, e.g. if the author's username is rymai
, then Hey {{author}}, please have a look!
would be expanded to Hey @rymai, please have a look!
.
Fields with multiple values are joined with ,
. For instance Labels for this issue are {{labels}}.
would be expanded to Labels for this issue are ~"In dev", ~"Quality", ~"feature proposal".
Fields unsupported by the resources or that are nil
are not replaced.
Closes #29 (closed)
Edited by Rémy Coutable