@emmertarmin/redmine-cli 0.1.0 → 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.
Files changed (2) hide show
  1. package/dist/index.js +18 -28
  2. 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 id = scalarValue(issue.id) ?? "?";
939
- const subject = scalarValue(issue.subject) ?? "Untitled issue";
940
- const sprint = getIssueSprintValue(issue);
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", scalarValue(issue.project)],
943
- ["Tracker", scalarValue(issue.tracker)],
944
- ["Status", scalarValue(issue.status)],
945
- ["Priority", scalarValue(issue.priority)],
946
- ["Assignee", scalarValue(issue.assigned_to)],
947
- ["Author", scalarValue(issue.author)],
948
- ["Sprint", sprint],
949
- ["Done", scalarValue(issue.done_ratio) ? `${scalarValue(issue.done_ratio)}%` : undefined],
950
- ["Estimated", formatHours(issue.estimated_hours)],
951
- ["Spent", formatHours(issue.spent_hours)],
952
- ["Total spent", formatHours(issue.total_spent_hours)],
953
- ["Start", scalarValue(issue.start_date)],
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
- const description = normalizeRedmineTextileToMarkdown(issue.description);
965
- if (description) {
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.0",
1830
+ version: "0.1.2",
1841
1831
  description: "A personal Redmine CLI.",
1842
1832
  license: "MIT",
1843
1833
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emmertarmin/redmine-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A personal Redmine CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {