From ad99e45ee3de59de4b5fcca312cb077d90d73335 Mon Sep 17 00:00:00 2001 From: Karl-Philipp Wulfert Date: Wed, 17 Apr 2019 15:45:25 +0200 Subject: [PATCH] feat: add timestamp to reports --- src/tasks/report.ts | 2 ++ templates/report.md.mustache | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/tasks/report.ts b/src/tasks/report.ts index 9feb65e4..d4d8a539 100644 --- a/src/tasks/report.ts +++ b/src/tasks/report.ts @@ -28,6 +28,7 @@ import {BOLD_LABELS, GROUPS, LABEL_WEIGHTS} from '../configuration'; export interface StructureForTemplate { issuesByAssignee: AssigneeWithIssues[]; meetingDay: string; + timestamp: string; } /** @@ -343,6 +344,7 @@ export async function generateReport(api: Api, label: string, template: string): const structureForTemplate: StructureForTemplate = { issuesByAssignee: issuesGroupedByAssignee, meetingDay: getNextMeetingDay(), + timestamp: moment().format('LLL'), }; return render( diff --git a/templates/report.md.mustache b/templates/report.md.mustache index 457ae2bc..d45122b2 100644 --- a/templates/report.md.mustache +++ b/templates/report.md.mustache @@ -12,3 +12,5 @@ {{#issues}}| __[{{#$closed}}~~{{title}}~~{{/$closed}}{{^$closed}}{{title}}{{/$closed}}]({{&web_url}})__
__Labels:__{{#$labels}}{{#bold}} __{{label}}__ {{/bold}}{{^bold}} {{label}} {{/bold}}{{/$labels}} | {{#$branchExists}}branch exists{{/$branchExists}}{{#$mergeRequestUrl}}[merge request exists]({{&$mergeRequestUrl}}){{/$mergeRequestUrl}} | [{{$project}}](https://gitlab.com/{{&$project}}) | {{$weeksOpen}} | {{/issues}} {{/issuesByAssignee}} + +Generated {{timestamp}}.