<% my $api = gitprep_api; my $user_id = stash('user_id'); my $issue_message = stash('issue_message'); my $session_user_id = $api->session_user_id; my $is_owner_comment = $issue_message->{'user.id'} eq $user_id; my $is_my_project = $user_id eq $session_user_id; my $is_my_comment = $issue_message->{'user.id'} eq $session_user_id; my $can_modify = $is_my_project || $is_my_comment; %>
<%= $issue_message->{'user.id'} %> commented <%= $api->age_string($issue_message->{update_time}) %>
% if ($is_owner_comment) {
Owner
% } % if ($can_modify) { % } % if ($issue_message->{number} != 1) { % if ($can_modify) {
% } % }
<%== $api->markdown($issue_message->{message}) %>
% if ($can_modify) { % }