release-please 13.4.2 → 13.4.3
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
### [13.4.3](https://github.com/googleapis/release-please/compare/v13.4.2...v13.4.3) (2022-01-24)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* multi-component manifest release notes for single component release ([#1247](https://github.com/googleapis/release-please/issues/1247)) ([16aee09](https://github.com/googleapis/release-please/commit/16aee099c79d75853e565f83017745eef13b57fa))
|
|
13
|
+
* release notes should parse initial version heading ([#1248](https://github.com/googleapis/release-please/issues/1248)) ([71dc495](https://github.com/googleapis/release-please/commit/71dc4954e2393f74c4442c021fcf6c8ee530b4ae))
|
|
14
|
+
|
|
7
15
|
### [13.4.2](https://github.com/googleapis/release-please/compare/v13.4.1...v13.4.2) (2022-01-21)
|
|
8
16
|
|
|
9
17
|
|
package/build/src/manifest.js
CHANGED
|
@@ -316,6 +316,7 @@ class Manifest {
|
|
|
316
316
|
targetBranch: this.targetBranch,
|
|
317
317
|
repositoryConfig: this.repositoryConfig,
|
|
318
318
|
}));
|
|
319
|
+
logger_1.logger.info(`separate pull requests: ${this.separatePullRequests}`);
|
|
319
320
|
// Combine pull requests into 1 unless configured for separate
|
|
320
321
|
// pull requests
|
|
321
322
|
if (!this.separatePullRequests) {
|
|
@@ -20,6 +20,7 @@ const pull_request_title_1 = require("../util/pull-request-title");
|
|
|
20
20
|
const pull_request_body_1 = require("../util/pull-request-body");
|
|
21
21
|
const branch_name_1 = require("../util/branch-name");
|
|
22
22
|
const composite_1 = require("../updaters/composite");
|
|
23
|
+
const logger_1 = require("../util/logger");
|
|
23
24
|
/**
|
|
24
25
|
* This plugin merges multiple pull requests into a single
|
|
25
26
|
* release pull request.
|
|
@@ -36,6 +37,7 @@ class Merge extends plugin_1.ManifestPlugin {
|
|
|
36
37
|
if (candidates.length < 1) {
|
|
37
38
|
return candidates;
|
|
38
39
|
}
|
|
40
|
+
logger_1.logger.info(`Merging ${candidates.length} pull requests`);
|
|
39
41
|
const releaseData = [];
|
|
40
42
|
const labels = new Set();
|
|
41
43
|
let rawUpdates = [];
|
|
@@ -54,7 +56,7 @@ class Merge extends plugin_1.ManifestPlugin {
|
|
|
54
56
|
const updates = composite_1.mergeUpdates(rawUpdates);
|
|
55
57
|
const pullRequest = {
|
|
56
58
|
title: pull_request_title_1.PullRequestTitle.ofComponentTargetBranchVersion(rootRelease === null || rootRelease === void 0 ? void 0 : rootRelease.pullRequest.title.component, this.targetBranch, rootRelease === null || rootRelease === void 0 ? void 0 : rootRelease.pullRequest.title.version, this.pullRequestTitlePattern),
|
|
57
|
-
body: new pull_request_body_1.PullRequestBody(releaseData),
|
|
59
|
+
body: new pull_request_body_1.PullRequestBody(releaseData, { useComponents: true }),
|
|
58
60
|
updates,
|
|
59
61
|
labels: Array.from(labels),
|
|
60
62
|
headRefName: branch_name_1.BranchName.ofTargetBranch(this.targetBranch).toString(),
|
|
@@ -3,12 +3,14 @@ interface PullRequestBodyOptions {
|
|
|
3
3
|
header?: string;
|
|
4
4
|
footer?: string;
|
|
5
5
|
extra?: string;
|
|
6
|
+
useComponents?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare class PullRequestBody {
|
|
8
9
|
header: string;
|
|
9
10
|
footer: string;
|
|
10
11
|
extra?: string;
|
|
11
12
|
releaseData: ReleaseData[];
|
|
13
|
+
useComponents: boolean;
|
|
12
14
|
constructor(releaseData: ReleaseData[], options?: PullRequestBodyOptions);
|
|
13
15
|
static parse(body: string): PullRequestBody | undefined;
|
|
14
16
|
notes(): string;
|
|
@@ -22,10 +22,12 @@ const DEFAULT_FOOTER = 'This PR was generated with [Release Please](https://gith
|
|
|
22
22
|
const NOTES_DELIMITER = '---';
|
|
23
23
|
class PullRequestBody {
|
|
24
24
|
constructor(releaseData, options) {
|
|
25
|
+
var _a;
|
|
25
26
|
this.header = (options === null || options === void 0 ? void 0 : options.header) || DEFAULT_HEADER;
|
|
26
27
|
this.footer = (options === null || options === void 0 ? void 0 : options.footer) || DEFAULT_FOOTER;
|
|
27
28
|
this.extra = options === null || options === void 0 ? void 0 : options.extra;
|
|
28
29
|
this.releaseData = releaseData;
|
|
30
|
+
this.useComponents = (_a = options === null || options === void 0 ? void 0 : options.useComponents) !== null && _a !== void 0 ? _a : this.releaseData.length > 1;
|
|
29
31
|
}
|
|
30
32
|
static parse(body) {
|
|
31
33
|
const parts = splitBody(body);
|
|
@@ -46,7 +48,7 @@ class PullRequestBody {
|
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
notes() {
|
|
49
|
-
if (this.
|
|
51
|
+
if (this.useComponents) {
|
|
50
52
|
return this.releaseData
|
|
51
53
|
.map(release => {
|
|
52
54
|
var _a;
|
|
@@ -110,7 +112,7 @@ function extractMultipleReleases(notes) {
|
|
|
110
112
|
}
|
|
111
113
|
return data;
|
|
112
114
|
}
|
|
113
|
-
const COMPARE_REGEX = /^#{2,} \[(?<version>\d+\.\d+\.\d+.*)\]
|
|
115
|
+
const COMPARE_REGEX = /^#{2,} \[?(?<version>\d+\.\d+\.\d+.*)\]?/;
|
|
114
116
|
function extractSingleRelease(body) {
|
|
115
117
|
var _a;
|
|
116
118
|
body = body.trim();
|