@emmertarmin/redmine-cli 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -935,39 +935,29 @@ ${frontmatter.join(`
|
|
|
935
935
|
if (!isRecord(issue)) {
|
|
936
936
|
continue;
|
|
937
937
|
}
|
|
938
|
-
const
|
|
939
|
-
const
|
|
940
|
-
const
|
|
938
|
+
const summary = summarizeIssue(issue);
|
|
939
|
+
const id = scalarValue(summary.id) ?? "?";
|
|
940
|
+
const subject = scalarValue(summary.subject) ?? "Untitled issue";
|
|
941
941
|
const fields = markdownTable([
|
|
942
|
-
["Project",
|
|
943
|
-
["Tracker",
|
|
944
|
-
["Status",
|
|
945
|
-
["Priority",
|
|
946
|
-
["Assignee",
|
|
947
|
-
["Author",
|
|
948
|
-
["Sprint", sprint],
|
|
949
|
-
["Done", scalarValue(
|
|
950
|
-
["Estimated", formatHours(
|
|
951
|
-
["Spent", formatHours(
|
|
952
|
-
["
|
|
953
|
-
["
|
|
954
|
-
["Due", scalarValue(issue.due_date)],
|
|
955
|
-
["Created", formatDateTime(issue.created_on)],
|
|
956
|
-
["Updated", formatDateTime(issue.updated_on)],
|
|
957
|
-
["Closed", formatDateTime(issue.closed_on)],
|
|
958
|
-
["Private", issue.is_private === true ? "yes" : undefined]
|
|
942
|
+
["Project", summary.project],
|
|
943
|
+
["Tracker", summary.tracker],
|
|
944
|
+
["Status", summary.status],
|
|
945
|
+
["Priority", summary.priority],
|
|
946
|
+
["Assignee", summary.assignee],
|
|
947
|
+
["Author", summary.author],
|
|
948
|
+
["Sprint", summary.sprint],
|
|
949
|
+
["Done", scalarValue(summary.done_ratio) ? `${scalarValue(summary.done_ratio)}%` : undefined],
|
|
950
|
+
["Estimated", formatHours(summary.estimated_hours)],
|
|
951
|
+
["Spent", formatHours(summary.spent_hours)],
|
|
952
|
+
["Created", formatDateTime(summary.created_on)],
|
|
953
|
+
["Updated", formatDateTime(summary.updated_on)]
|
|
959
954
|
]);
|
|
960
955
|
parts.push(`## #${mdEscape(id)} ${mdEscape(subject)}`);
|
|
961
956
|
if (fields) {
|
|
962
957
|
parts.push(fields);
|
|
963
958
|
}
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
parts.push("### Description", description);
|
|
967
|
-
}
|
|
968
|
-
const customFields = customFieldsMarkdown(issue);
|
|
969
|
-
if (customFields) {
|
|
970
|
-
parts.push("### Custom fields", customFields);
|
|
959
|
+
if (summary.description_preview) {
|
|
960
|
+
parts.push("### Description preview", mdEscape(summary.description_preview));
|
|
971
961
|
}
|
|
972
962
|
}
|
|
973
963
|
return `${parts.join(`
|
|
@@ -1837,7 +1827,7 @@ function parseCli(args) {
|
|
|
1837
1827
|
// package.json
|
|
1838
1828
|
var package_default = {
|
|
1839
1829
|
name: "@emmertarmin/redmine-cli",
|
|
1840
|
-
version: "0.1.
|
|
1830
|
+
version: "0.1.2",
|
|
1841
1831
|
description: "A personal Redmine CLI.",
|
|
1842
1832
|
license: "MIT",
|
|
1843
1833
|
repository: {
|