@cmflow/cli 2.0.6 → 2.0.8

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmflow/cli",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "An awesome Git Flow",
5
5
  "author": "camfou",
6
6
  "license": "MIT",
@@ -84,9 +84,10 @@ Au menu de cette livraison :
84
84
  ${context.releases
85
85
  .reverse()
86
86
  .map((release) => {
87
- const issues = release.issues.map((issue) => {
88
- return ` - ${TYPES[issue.fields.issuetype.name] || issue.fields.issuetype.name}(${issue.key}): ${getSummary(issue)}`;
89
- });
87
+ const issues =
88
+ release.issues?.map((issue) => {
89
+ return ` - ${TYPES[issue.fields.issuetype.name] || issue.fields.issuetype.name}(${issue.key}): ${getSummary(issue)}`;
90
+ }) || [];
90
91
 
91
92
  return issues.length ? (context.releases.length > 1 ? "- v" + release.version + ":\n" : "") + issues.join(",\n") : false;
92
93
  })
@@ -34,5 +34,7 @@ export async function updateJiraRelease(release) {
34
34
  }
35
35
 
36
36
  export async function getJiraVersionRelatedIssues(projectId, tagVersion) {
37
- return jiraSearch(`project = "${projectId}" AND fixVersion="${tagVersion}" ORDER BY created DESC`);
37
+ return jiraSearch(`project = "${projectId}" AND fixVersion="${tagVersion}" ORDER BY created DESC`, {
38
+ fields: ["summary", "issuetype", "status", "assignee", "reporter", "created", "updated"]
39
+ });
38
40
  }
@@ -8,7 +8,7 @@ import { jiraRequest } from "./jira-request.js";
8
8
  * @returns {Promise<{issues: (import("./interfaces/JiraIIssue.d.ts").JiraIssue & Expand)[], total: number, maxResults: number}>}
9
9
  */
10
10
  export function jiraSearch(jql, opts) {
11
- return jiraRequest("/rest/api/3/search", {
11
+ return jiraRequest("/rest/api/3/search/jql", {
12
12
  params: {
13
13
  ...opts,
14
14
  jql
@@ -15,7 +15,7 @@ describe("jiraSearch", () => {
15
15
  const jql = "project = TEST";
16
16
  const result = await jiraSearch(jql);
17
17
 
18
- expect(jiraRequest).toHaveBeenCalledWith("/rest/api/3/search", {
18
+ expect(jiraRequest).toHaveBeenCalledWith("/rest/api/3/search/jql", {
19
19
  params: {
20
20
  jql
21
21
  }
@@ -32,7 +32,7 @@ describe("jiraSearch", () => {
32
32
  expand: "changelog"
33
33
  });
34
34
 
35
- expect(jiraRequest).toHaveBeenCalledWith("/rest/api/3/search", {
35
+ expect(jiraRequest).toHaveBeenCalledWith("/rest/api/3/search/jql", {
36
36
  params: {
37
37
  expand: "changelog",
38
38
  jql