release-please 13.4.9 → 13.4.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.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
### [13.4.10](https://github.com/googleapis/release-please/compare/v13.4.9...v13.4.10) (2022-02-16)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **go-yoshi:** dynamically load list of ignored submodules for google-cloud-go ([#1291](https://github.com/googleapis/release-please/issues/1291)) ([36f6ad9](https://github.com/googleapis/release-please/commit/36f6ad94fe471e5a46cc46ebd6f5b5c581a29c2c))
|
|
13
|
+
* manifest release can handle componentless entry ([#1300](https://github.com/googleapis/release-please/issues/1300)) ([6b58573](https://github.com/googleapis/release-please/commit/6b585734fe7b49f0e351b73b27260a304d6c80dd))
|
|
14
|
+
* return uploadUrl and body when creating release ([#1298](https://github.com/googleapis/release-please/issues/1298)) ([5d767c5](https://github.com/googleapis/release-please/commit/5d767c536594a8e24d274a4268cda1f1aa3babff))
|
|
15
|
+
|
|
7
16
|
### [13.4.9](https://github.com/googleapis/release-please/compare/v13.4.8...v13.4.9) (2022-02-14)
|
|
8
17
|
|
|
9
18
|
|
package/build/src/github.d.ts
CHANGED
package/build/src/github.js
CHANGED
|
@@ -324,9 +324,13 @@ class GitHub {
|
|
|
324
324
|
name: resp.data.name || undefined,
|
|
325
325
|
tagName: resp.data.tag_name,
|
|
326
326
|
sha: resp.data.target_commitish,
|
|
327
|
-
notes: resp.data.body_text
|
|
327
|
+
notes: resp.data.body_text ||
|
|
328
|
+
resp.data.body ||
|
|
329
|
+
resp.data.body_html ||
|
|
330
|
+
undefined,
|
|
328
331
|
url: resp.data.html_url,
|
|
329
332
|
draft: resp.data.draft,
|
|
333
|
+
uploadUrl: resp.data.upload_url,
|
|
330
334
|
};
|
|
331
335
|
}, e => {
|
|
332
336
|
if (e instanceof request_error_1.RequestError) {
|
|
@@ -8,6 +8,7 @@ export declare class GoYoshi extends BaseStrategy {
|
|
|
8
8
|
constructor(options: BaseStrategyOptions);
|
|
9
9
|
protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
|
|
10
10
|
protected postProcessCommits(commits: ConventionalCommit[]): Promise<ConventionalCommit[]>;
|
|
11
|
+
getIgnoredSubModules(): Promise<Set<string>>;
|
|
11
12
|
protected buildReleaseNotes(conventionalCommits: ConventionalCommit[], newVersion: Version, newVersionTag: TagName, latestRelease?: Release): Promise<string>;
|
|
12
13
|
protected initialReleaseVersion(): Version;
|
|
13
14
|
}
|
|
@@ -19,19 +19,7 @@ const changelog_1 = require("../updaters/changelog");
|
|
|
19
19
|
const version_1 = require("../version");
|
|
20
20
|
const version_go_1 = require("../updaters/go/version-go");
|
|
21
21
|
const logger_1 = require("../util/logger");
|
|
22
|
-
|
|
23
|
-
// ignored when generating a release PR for the parent module.
|
|
24
|
-
const IGNORED_SUB_MODULES = new Set([
|
|
25
|
-
'bigtable',
|
|
26
|
-
'bigquery',
|
|
27
|
-
'datastore',
|
|
28
|
-
'firestore',
|
|
29
|
-
'logging',
|
|
30
|
-
'pubsub',
|
|
31
|
-
'pubsublite',
|
|
32
|
-
'spanner',
|
|
33
|
-
'storage',
|
|
34
|
-
]);
|
|
22
|
+
const path_1 = require("path");
|
|
35
23
|
const REGEN_PR_REGEX = /.*auto-regenerate.*/;
|
|
36
24
|
const REGEN_ISSUE_REGEX = /(?<prefix>.*)\(#(?<pr>.*)\)(\n|$)/;
|
|
37
25
|
class GoYoshi extends base_1.BaseStrategy {
|
|
@@ -64,6 +52,7 @@ class GoYoshi extends base_1.BaseStrategy {
|
|
|
64
52
|
let regenCommit;
|
|
65
53
|
const component = await this.getComponent();
|
|
66
54
|
logger_1.logger.debug('Filtering commits');
|
|
55
|
+
const ignoredSubmodules = await this.getIgnoredSubModules();
|
|
67
56
|
return commits.filter(commit => {
|
|
68
57
|
var _a, _b;
|
|
69
58
|
// Only have a single entry of the nightly regen listed in the changelog.
|
|
@@ -119,7 +108,7 @@ class GoYoshi extends base_1.BaseStrategy {
|
|
|
119
108
|
else {
|
|
120
109
|
// This is the main module release, so ignore sub modules that
|
|
121
110
|
// are released independently
|
|
122
|
-
for (const submodule of
|
|
111
|
+
for (const submodule of ignoredSubmodules) {
|
|
123
112
|
if (commitMatchesScope(commit.scope, submodule)) {
|
|
124
113
|
logger_1.logger.debug(`Skipping ignored commit scope: ${commit.scope}`);
|
|
125
114
|
return false;
|
|
@@ -130,6 +119,22 @@ class GoYoshi extends base_1.BaseStrategy {
|
|
|
130
119
|
return true;
|
|
131
120
|
});
|
|
132
121
|
}
|
|
122
|
+
async getIgnoredSubModules() {
|
|
123
|
+
// ignored submodules only applies to the root component of
|
|
124
|
+
// googleapis/google-cloud-go
|
|
125
|
+
if (this.repository.owner !== 'googleapis' ||
|
|
126
|
+
this.repository.repo !== 'google-cloud-go' ||
|
|
127
|
+
this.includeComponentInTag) {
|
|
128
|
+
return new Set();
|
|
129
|
+
}
|
|
130
|
+
logger_1.logger.info('Looking for go.mod files');
|
|
131
|
+
const paths = (await this.github.findFilesByFilenameAndRef('go.mod', this.targetBranch))
|
|
132
|
+
.filter(path => !path.includes('internal') && path !== 'go.mod')
|
|
133
|
+
.map(path => path_1.dirname(path));
|
|
134
|
+
logger_1.logger.info(`Found ${paths.length} submodules`);
|
|
135
|
+
logger_1.logger.debug(JSON.stringify(paths));
|
|
136
|
+
return new Set(paths);
|
|
137
|
+
}
|
|
133
138
|
// "closes" is a little presumptuous, let's just indicate that the
|
|
134
139
|
// PR references these other commits:
|
|
135
140
|
async buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease) {
|
|
@@ -52,7 +52,7 @@ class PullRequestBody {
|
|
|
52
52
|
return this.releaseData
|
|
53
53
|
.map(release => {
|
|
54
54
|
var _a;
|
|
55
|
-
return `<details><summary>${release.component}: ${(_a = release.version) === null || _a === void 0 ? void 0 : _a.toString()}</summary>\n\n${release.notes}\n</details>`;
|
|
55
|
+
return `<details><summary>${release.component ? `${release.component}: ` : ''}${(_a = release.version) === null || _a === void 0 ? void 0 : _a.toString()}</summary>\n\n${release.notes}\n</details>`;
|
|
56
56
|
})
|
|
57
57
|
.join('\n\n');
|
|
58
58
|
}
|
|
@@ -91,6 +91,7 @@ function splitBody(body) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
const SUMMARY_PATTERN = /^(?<component>.*[^:]):? (?<version>\d+\.\d+\.\d+.*)$/;
|
|
94
|
+
const COMPONENTLESS_SUMMARY_PATTERN = /^(?<version>\d+\.\d+\.\d+.*)$/;
|
|
94
95
|
function extractMultipleReleases(notes) {
|
|
95
96
|
const data = [];
|
|
96
97
|
const root = node_html_parser_1.parse(notes);
|
|
@@ -98,17 +99,28 @@ function extractMultipleReleases(notes) {
|
|
|
98
99
|
const summaryNode = detail.getElementsByTagName('summary')[0];
|
|
99
100
|
const summary = summaryNode === null || summaryNode === void 0 ? void 0 : summaryNode.textContent;
|
|
100
101
|
const match = summary.match(SUMMARY_PATTERN);
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
if (match === null || match === void 0 ? void 0 : match.groups) {
|
|
103
|
+
detail.removeChild(summaryNode);
|
|
104
|
+
const notes = detail.textContent.trim();
|
|
105
|
+
data.push({
|
|
106
|
+
component: match.groups.component,
|
|
107
|
+
version: version_1.Version.parse(match.groups.version),
|
|
108
|
+
notes,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
const componentlessMatch = summary.match(COMPONENTLESS_SUMMARY_PATTERN);
|
|
113
|
+
if (!(componentlessMatch === null || componentlessMatch === void 0 ? void 0 : componentlessMatch.groups)) {
|
|
114
|
+
logger_1.logger.warn(`Summary: ${summary} did not match the expected pattern`);
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
detail.removeChild(summaryNode);
|
|
118
|
+
const notes = detail.textContent.trim();
|
|
119
|
+
data.push({
|
|
120
|
+
version: version_1.Version.parse(componentlessMatch.groups.version),
|
|
121
|
+
notes,
|
|
122
|
+
});
|
|
104
123
|
}
|
|
105
|
-
detail.removeChild(summaryNode);
|
|
106
|
-
const notes = detail.textContent.trim();
|
|
107
|
-
data.push({
|
|
108
|
-
component: match.groups.component,
|
|
109
|
-
version: version_1.Version.parse(match.groups.version),
|
|
110
|
-
notes,
|
|
111
|
-
});
|
|
112
124
|
}
|
|
113
125
|
return data;
|
|
114
126
|
}
|
package/package.json
CHANGED