release-please 14.17.3 → 14.17.4
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,13 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [14.17.4](https://github.com/googleapis/release-please/compare/v14.17.3...v14.17.4) (2022-12-01)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* Pass group-pull-request-title-pattern to strategies to parse releases ([#1760](https://github.com/googleapis/release-please/issues/1760)) ([f7601e4](https://github.com/googleapis/release-please/commit/f7601e423a267861fb86a441d1835ddf6da07a83))
|
|
13
|
+
|
|
7
14
|
## [14.17.3](https://github.com/googleapis/release-please/compare/v14.17.2...v14.17.3) (2022-11-26)
|
|
8
15
|
|
|
9
16
|
|
package/build/src/manifest.js
CHANGED
|
@@ -587,7 +587,9 @@ class Manifest {
|
|
|
587
587
|
this.logger.debug(`type: ${config.releaseType}`);
|
|
588
588
|
this.logger.debug(`targetBranch: ${this.targetBranch}`);
|
|
589
589
|
const strategy = strategiesByPath[path];
|
|
590
|
-
const release = await strategy.buildRelease(pullRequest
|
|
590
|
+
const release = await strategy.buildRelease(pullRequest, {
|
|
591
|
+
groupPullRequestTitlePattern: this.groupPullRequestTitlePattern,
|
|
592
|
+
});
|
|
591
593
|
if (release) {
|
|
592
594
|
releases.push({
|
|
593
595
|
...release,
|
|
@@ -116,9 +116,10 @@ class LinkedVersions extends plugin_1.ManifestPlugin {
|
|
|
116
116
|
}
|
|
117
117
|
return collection;
|
|
118
118
|
}, [[], []]);
|
|
119
|
+
this.logger.info(`found ${inScopeCandidates.length} linked-versions candidates`);
|
|
119
120
|
// delegate to the merge plugin and add merged pull request
|
|
120
121
|
if (inScopeCandidates.length > 0) {
|
|
121
|
-
const merge = new merge_1.Merge(this.github, this.targetBranch, this.repositoryConfig, `chore\${
|
|
122
|
+
const merge = new merge_1.Merge(this.github, this.targetBranch, this.repositoryConfig, `chore\${scope}: release ${this.groupName} libraries`);
|
|
122
123
|
const merged = await merge.run(inScopeCandidates);
|
|
123
124
|
outOfScopeCandidates.push(...merged);
|
|
124
125
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Strategy } from '../strategy';
|
|
1
|
+
import { Strategy, BuildReleaseOptions } from '../strategy';
|
|
2
2
|
import { GitHub } from '../github';
|
|
3
3
|
import { VersioningStrategy } from '../versioning-strategy';
|
|
4
4
|
import { Repository } from '../repository';
|
|
@@ -125,7 +125,7 @@ export declare abstract class BaseStrategy implements Strategy {
|
|
|
125
125
|
* @param {PullRequest} mergedPullRequest The merged release pull request.
|
|
126
126
|
* @returns {Release} The candidate release.
|
|
127
127
|
*/
|
|
128
|
-
buildRelease(mergedPullRequest: PullRequest): Promise<Release | undefined>;
|
|
128
|
+
buildRelease(mergedPullRequest: PullRequest, options?: BuildReleaseOptions): Promise<Release | undefined>;
|
|
129
129
|
isPublishedVersion(_version: Version): boolean;
|
|
130
130
|
/**
|
|
131
131
|
* Override this to handle the initial version of a new library.
|
|
@@ -288,7 +288,8 @@ class BaseStrategy {
|
|
|
288
288
|
* @param {PullRequest} mergedPullRequest The merged release pull request.
|
|
289
289
|
* @returns {Release} The candidate release.
|
|
290
290
|
*/
|
|
291
|
-
async buildRelease(mergedPullRequest) {
|
|
291
|
+
async buildRelease(mergedPullRequest, options) {
|
|
292
|
+
var _a;
|
|
292
293
|
if (this.skipGitHubRelease) {
|
|
293
294
|
this.logger.info('Release skipped from strategy config');
|
|
294
295
|
return;
|
|
@@ -297,8 +298,9 @@ class BaseStrategy {
|
|
|
297
298
|
this.logger.error('Pull request should have been merged');
|
|
298
299
|
return;
|
|
299
300
|
}
|
|
301
|
+
const mergedTitlePattern = (_a = options === null || options === void 0 ? void 0 : options.groupPullRequestTitlePattern) !== null && _a !== void 0 ? _a : manifest_1.MANIFEST_PULL_REQUEST_TITLE_PATTERN;
|
|
300
302
|
const pullRequestTitle = pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title, this.pullRequestTitlePattern, this.logger) ||
|
|
301
|
-
pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title,
|
|
303
|
+
pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title, mergedTitlePattern, this.logger);
|
|
302
304
|
if (!pullRequestTitle) {
|
|
303
305
|
this.logger.error(`Bad pull request title: '${mergedPullRequest.title}'`);
|
|
304
306
|
return;
|
package/build/src/strategy.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ import { Commit } from './commit';
|
|
|
5
5
|
import { VersioningStrategy } from './versioning-strategy';
|
|
6
6
|
import { ChangelogNotes } from './changelog-notes';
|
|
7
7
|
import { Version } from './version';
|
|
8
|
+
export interface BuildReleaseOptions {
|
|
9
|
+
groupPullRequestTitlePattern?: string;
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* A strategy is responsible for determining which files are
|
|
10
13
|
* necessary to update in a release pull request.
|
|
@@ -30,7 +33,7 @@ export interface Strategy {
|
|
|
30
33
|
* @param {PullRequest} mergedPullRequest The merged release pull request.
|
|
31
34
|
* @returns {Release} The candidate release.
|
|
32
35
|
*/
|
|
33
|
-
buildRelease(mergedPullRequest: PullRequest): Promise<Release | undefined>;
|
|
36
|
+
buildRelease(mergedPullRequest: PullRequest, options?: BuildReleaseOptions): Promise<Release | undefined>;
|
|
34
37
|
/**
|
|
35
38
|
* Return the component for this strategy. This may be a computed field.
|
|
36
39
|
* @returns {string}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-please",
|
|
3
|
-
"version": "14.17.
|
|
3
|
+
"version": "14.17.4",
|
|
4
4
|
"description": "generate release PRs based on the conventionalcommits.org spec",
|
|
5
5
|
"main": "./build/src/index.js",
|
|
6
6
|
"bin": "./build/src/bin/release-please.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"gts": "^3.1.0",
|
|
64
64
|
"mocha": "^9.2.2",
|
|
65
65
|
"nock": "^13.0.0",
|
|
66
|
-
"sinon": "
|
|
66
|
+
"sinon": "15.0.0",
|
|
67
67
|
"snap-shot-it": "^7.0.0"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|