@afoures/auto-release 0.2.8 → 0.2.10
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.
|
@@ -5,8 +5,7 @@ import { find_nearest_config } from "../config.mjs";
|
|
|
5
5
|
import { find_change_files } from "../change-file.mjs";
|
|
6
6
|
import { diff, reset } from "../utils/git.mjs";
|
|
7
7
|
import { compute_current_version } from "../utils/version.mjs";
|
|
8
|
-
import "
|
|
9
|
-
import { join, relative } from "node:path";
|
|
8
|
+
import { join } from "node:path";
|
|
10
9
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
11
10
|
import { gfmFromMarkdown } from "mdast-util-gfm";
|
|
12
11
|
import { gfm } from "micromark-extension-gfm";
|
|
@@ -108,7 +107,7 @@ const generate_release_pr = create_command({
|
|
|
108
107
|
await platform.create_or_update_pull_request({
|
|
109
108
|
head_branch_name: release_branch_name,
|
|
110
109
|
base_branch_name: config.git.target_branch,
|
|
111
|
-
title: `
|
|
110
|
+
title: `release: ${app.name}@${next_version}`,
|
|
112
111
|
body: formatter.generate_pr_body({
|
|
113
112
|
app: { name: app.name },
|
|
114
113
|
current_version,
|
|
@@ -3,7 +3,6 @@ import { create_logger } from "../utils/logger.mjs";
|
|
|
3
3
|
import { find_nearest_config } from "../config.mjs";
|
|
4
4
|
import { get_head_and_parent_shas, read_file_at_revision } from "../utils/git.mjs";
|
|
5
5
|
import { compute_current_version } from "../utils/version.mjs";
|
|
6
|
-
import "../utils/branch-protection.mjs";
|
|
7
6
|
import { relative } from "node:path";
|
|
8
7
|
|
|
9
8
|
//#region src/lib/commands/tag-release-commit.ts
|
package/dist/lib/formatter.mjs
CHANGED
|
@@ -111,6 +111,7 @@ function default_formatter({ allowed_changes, display_map }) {
|
|
|
111
111
|
release_lines.push(`### ${heading}`, "");
|
|
112
112
|
for (const change of kind_changes) release_lines.push(`- ${change.summary.split("\n").join("\n ")}`, "");
|
|
113
113
|
}
|
|
114
|
+
if (release.changes.length === 0) release_lines.push("No changes in this release.");
|
|
114
115
|
lines.push(release_lines.join("\n"));
|
|
115
116
|
}
|
|
116
117
|
return lines.join("\n\n");
|
|
@@ -71,7 +71,8 @@ ${error_text}`);
|
|
|
71
71
|
})).id;
|
|
72
72
|
},
|
|
73
73
|
async create_or_update_pull_request(args) {
|
|
74
|
-
const { head_branch_name, base_branch_name, title, body, draft = false } = args;
|
|
74
|
+
const { head_branch_name, base_branch_name, title: initial_title, body, draft = false } = args;
|
|
75
|
+
const title = draft ? `Draft: ${initial_title}` : initial_title;
|
|
75
76
|
const mrs = await api_request(`/merge_requests?state=opened&source_branch=${encodeURIComponent(head_branch_name)}`);
|
|
76
77
|
if (mrs.length > 0) {
|
|
77
78
|
const mr = mrs[0];
|
|
@@ -79,8 +80,7 @@ ${error_text}`);
|
|
|
79
80
|
method: "PUT",
|
|
80
81
|
body: JSON.stringify({
|
|
81
82
|
title,
|
|
82
|
-
description: body
|
|
83
|
-
work_in_progress: draft
|
|
83
|
+
description: body
|
|
84
84
|
})
|
|
85
85
|
});
|
|
86
86
|
return {
|
|
@@ -96,8 +96,7 @@ ${error_text}`);
|
|
|
96
96
|
source_branch: head_branch_name,
|
|
97
97
|
target_branch: base_branch_name,
|
|
98
98
|
title,
|
|
99
|
-
description: body
|
|
100
|
-
work_in_progress: draft
|
|
99
|
+
description: body
|
|
101
100
|
})
|
|
102
101
|
});
|
|
103
102
|
return {
|