release-please 16.1.0 → 16.2.0
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 +13 -0
- package/README.md +1 -1
- package/build/src/bin/release-please.js +5 -0
- package/build/src/manifest.d.ts +2 -0
- package/build/src/manifest.js +12 -14
- package/build/src/plugins/merge.d.ts +2 -0
- package/build/src/plugins/merge.js +2 -0
- package/build/src/strategies/base.d.ts +3 -1
- package/build/src/strategies/base.js +7 -3
- package/build/src/strategies/dotnet-yoshi.js +5 -2
- package/build/src/updaters/release-please-config.js +1 -0
- package/build/src/util/pull-request-body.js +1 -1
- package/package.json +1 -1
- package/schemas/config.json +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [16.2.0](https://github.com/googleapis/release-please/compare/v16.1.0...v16.2.0) (2023-11-08)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Allow customizing PR body footer ([#2115](https://github.com/googleapis/release-please/issues/2115)) ([43014a1](https://github.com/googleapis/release-please/commit/43014a1f15d3640d67cb90cbf3047919facfa53e))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Correctly parse standalone prerelease PR body ([#2123](https://github.com/googleapis/release-please/issues/2123)) ([5ee9e3e](https://github.com/googleapis/release-please/commit/5ee9e3e9ae292dc4128717c3d5924da93b3bb670))
|
|
18
|
+
* Set PR labels serially ([#2122](https://github.com/googleapis/release-please/issues/2122)) ([bf58911](https://github.com/googleapis/release-please/commit/bf58911d989f08abe3105309b6e6f918186e1125))
|
|
19
|
+
|
|
7
20
|
## [16.1.0](https://github.com/googleapis/release-please/compare/v16.0.0...v16.1.0) (2023-10-26)
|
|
8
21
|
|
|
9
22
|
|
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ A linear git history makes it much easier to:
|
|
|
63
63
|
change introduced a bug
|
|
64
64
|
* Control the release-please changelog - when you merge a PR, you may have
|
|
65
65
|
commit messages that make sense within the scope of the PR, but don't
|
|
66
|
-
make sense when merged in the main branch. For example, you
|
|
66
|
+
make sense when merged in the main branch. For example, you may have
|
|
67
67
|
`feat: introduce feature A` and then `fix: some bugfix introduced in
|
|
68
68
|
the first commit`. The `fix` commit is actually irrelevant to the release
|
|
69
69
|
notes as there was never a bug experienced in the main branch.
|
|
@@ -274,6 +274,10 @@ function taggingOptions(yargs) {
|
|
|
274
274
|
.option('pull-request-header', {
|
|
275
275
|
describe: 'Header for release PR',
|
|
276
276
|
type: 'string',
|
|
277
|
+
})
|
|
278
|
+
.option('pull-request-footer', {
|
|
279
|
+
describe: 'Footer for release PR',
|
|
280
|
+
type: 'string',
|
|
277
281
|
});
|
|
278
282
|
}
|
|
279
283
|
const createReleasePullRequestCommand = {
|
|
@@ -300,6 +304,7 @@ const createReleasePullRequestCommand = {
|
|
|
300
304
|
changelogHost: argv.changelogHost,
|
|
301
305
|
pullRequestTitlePattern: argv.pullRequestTitlePattern,
|
|
302
306
|
pullRequestHeader: argv.pullRequestHeader,
|
|
307
|
+
pullRequestFooter: argv.pullRequestFooter,
|
|
303
308
|
changelogSections: argv.changelogSections,
|
|
304
309
|
releaseAs: argv.releaseAs,
|
|
305
310
|
versioning: argv.versioningStrategy,
|
package/build/src/manifest.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export interface ReleaserConfig {
|
|
|
57
57
|
includeVInTag?: boolean;
|
|
58
58
|
pullRequestTitlePattern?: string;
|
|
59
59
|
pullRequestHeader?: string;
|
|
60
|
+
pullRequestFooter?: string;
|
|
60
61
|
tagSeparator?: string;
|
|
61
62
|
separatePullRequests?: boolean;
|
|
62
63
|
labels?: string[];
|
|
@@ -105,6 +106,7 @@ interface ReleaserConfigJson {
|
|
|
105
106
|
'changelog-host'?: string;
|
|
106
107
|
'pull-request-title-pattern'?: string;
|
|
107
108
|
'pull-request-header'?: string;
|
|
109
|
+
'pull-request-footer'?: string;
|
|
108
110
|
'separate-pull-requests'?: boolean;
|
|
109
111
|
'tag-separator'?: string;
|
|
110
112
|
'extra-files'?: ExtraFile[];
|
package/build/src/manifest.js
CHANGED
|
@@ -688,10 +688,8 @@ class Manifest {
|
|
|
688
688
|
releases.length) {
|
|
689
689
|
// we've either tagged all releases or they were duplicates:
|
|
690
690
|
// adjust tags on pullRequest
|
|
691
|
-
await
|
|
692
|
-
|
|
693
|
-
this.github.addIssueLabels(this.releaseLabels, pullRequest.number),
|
|
694
|
-
]);
|
|
691
|
+
await this.github.removeIssueLabels(this.labels, pullRequest.number);
|
|
692
|
+
await this.github.addIssueLabels(this.releaseLabels, pullRequest.number);
|
|
695
693
|
}
|
|
696
694
|
if (githubReleases.length === 0) {
|
|
697
695
|
// If all releases were duplicate, throw a duplicate error
|
|
@@ -700,10 +698,8 @@ class Manifest {
|
|
|
700
698
|
}
|
|
701
699
|
else {
|
|
702
700
|
// adjust tags on pullRequest
|
|
703
|
-
await
|
|
704
|
-
|
|
705
|
-
this.github.addIssueLabels(this.releaseLabels, pullRequest.number),
|
|
706
|
-
]);
|
|
701
|
+
await this.github.removeIssueLabels(this.labels, pullRequest.number);
|
|
702
|
+
await this.github.addIssueLabels(this.releaseLabels, pullRequest.number);
|
|
707
703
|
}
|
|
708
704
|
return githubReleases;
|
|
709
705
|
}
|
|
@@ -791,6 +787,7 @@ function extractReleaserConfig(config) {
|
|
|
791
787
|
changelogType: config['changelog-type'],
|
|
792
788
|
pullRequestTitlePattern: config['pull-request-title-pattern'],
|
|
793
789
|
pullRequestHeader: config['pull-request-header'],
|
|
790
|
+
pullRequestFooter: config['pull-request-footer'],
|
|
794
791
|
tagSeparator: config['tag-separator'],
|
|
795
792
|
separatePullRequests: config['separate-pull-requests'],
|
|
796
793
|
labels: (_a = config['label']) === null || _a === void 0 ? void 0 : _a.split(','),
|
|
@@ -1011,7 +1008,7 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
|
|
|
1011
1008
|
return candidateTagVersion.sort((a, b) => b.compare(a))[0];
|
|
1012
1009
|
}
|
|
1013
1010
|
function mergeReleaserConfig(defaultConfig, pathConfig) {
|
|
1014
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
1011
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
1015
1012
|
return {
|
|
1016
1013
|
releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
|
|
1017
1014
|
bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
|
|
@@ -1035,11 +1032,12 @@ function mergeReleaserConfig(defaultConfig, pathConfig) {
|
|
|
1035
1032
|
tagSeparator: (_w = pathConfig.tagSeparator) !== null && _w !== void 0 ? _w : defaultConfig.tagSeparator,
|
|
1036
1033
|
pullRequestTitlePattern: (_x = pathConfig.pullRequestTitlePattern) !== null && _x !== void 0 ? _x : defaultConfig.pullRequestTitlePattern,
|
|
1037
1034
|
pullRequestHeader: (_y = pathConfig.pullRequestHeader) !== null && _y !== void 0 ? _y : defaultConfig.pullRequestHeader,
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1035
|
+
pullRequestFooter: (_z = pathConfig.pullRequestFooter) !== null && _z !== void 0 ? _z : defaultConfig.pullRequestFooter,
|
|
1036
|
+
separatePullRequests: (_0 = pathConfig.separatePullRequests) !== null && _0 !== void 0 ? _0 : defaultConfig.separatePullRequests,
|
|
1037
|
+
skipSnapshot: (_1 = pathConfig.skipSnapshot) !== null && _1 !== void 0 ? _1 : defaultConfig.skipSnapshot,
|
|
1038
|
+
initialVersion: (_2 = pathConfig.initialVersion) !== null && _2 !== void 0 ? _2 : defaultConfig.initialVersion,
|
|
1039
|
+
extraLabels: (_3 = pathConfig.extraLabels) !== null && _3 !== void 0 ? _3 : defaultConfig.extraLabels,
|
|
1040
|
+
excludePaths: (_4 = pathConfig.excludePaths) !== null && _4 !== void 0 ? _4 : defaultConfig.excludePaths,
|
|
1043
1041
|
};
|
|
1044
1042
|
}
|
|
1045
1043
|
/**
|
|
@@ -4,6 +4,7 @@ import { GitHub } from '../github';
|
|
|
4
4
|
interface MergeOptions {
|
|
5
5
|
pullRequestTitlePattern?: string;
|
|
6
6
|
pullRequestHeader?: string;
|
|
7
|
+
pullRequestFooter?: string;
|
|
7
8
|
headBranchName?: string;
|
|
8
9
|
forceMerge?: boolean;
|
|
9
10
|
}
|
|
@@ -16,6 +17,7 @@ interface MergeOptions {
|
|
|
16
17
|
export declare class Merge extends ManifestPlugin {
|
|
17
18
|
private pullRequestTitlePattern?;
|
|
18
19
|
private pullRequestHeader?;
|
|
20
|
+
private pullRequestFooter?;
|
|
19
21
|
private headBranchName?;
|
|
20
22
|
private forceMerge;
|
|
21
23
|
constructor(github: GitHub, targetBranch: string, repositoryConfig: RepositoryConfig, options?: MergeOptions);
|
|
@@ -33,6 +33,7 @@ class Merge extends plugin_1.ManifestPlugin {
|
|
|
33
33
|
this.pullRequestTitlePattern =
|
|
34
34
|
(_a = options.pullRequestTitlePattern) !== null && _a !== void 0 ? _a : manifest_1.MANIFEST_PULL_REQUEST_TITLE_PATTERN;
|
|
35
35
|
this.pullRequestHeader = options.pullRequestHeader;
|
|
36
|
+
this.pullRequestFooter = options.pullRequestFooter;
|
|
36
37
|
this.headBranchName = options.headBranchName;
|
|
37
38
|
this.forceMerge = (_b = options.forceMerge) !== null && _b !== void 0 ? _b : false;
|
|
38
39
|
}
|
|
@@ -72,6 +73,7 @@ class Merge extends plugin_1.ManifestPlugin {
|
|
|
72
73
|
body: new pull_request_body_1.PullRequestBody(releaseData, {
|
|
73
74
|
useComponents: true,
|
|
74
75
|
header: this.pullRequestHeader,
|
|
76
|
+
footer: this.pullRequestFooter,
|
|
75
77
|
}),
|
|
76
78
|
updates,
|
|
77
79
|
labels: Array.from(labels),
|
|
@@ -43,6 +43,7 @@ export interface BaseStrategyOptions {
|
|
|
43
43
|
includeVInTag?: boolean;
|
|
44
44
|
pullRequestTitlePattern?: string;
|
|
45
45
|
pullRequestHeader?: string;
|
|
46
|
+
pullRequestFooter?: string;
|
|
46
47
|
extraFiles?: ExtraFile[];
|
|
47
48
|
versionFile?: string;
|
|
48
49
|
snapshotLabels?: string[];
|
|
@@ -74,6 +75,7 @@ export declare abstract class BaseStrategy implements Strategy {
|
|
|
74
75
|
protected initialVersion?: string;
|
|
75
76
|
readonly pullRequestTitlePattern?: string;
|
|
76
77
|
readonly pullRequestHeader?: string;
|
|
78
|
+
readonly pullRequestFooter?: string;
|
|
77
79
|
readonly extraFiles: ExtraFile[];
|
|
78
80
|
readonly extraLabels: string[];
|
|
79
81
|
readonly changelogNotes: ChangelogNotes;
|
|
@@ -101,7 +103,7 @@ export declare abstract class BaseStrategy implements Strategy {
|
|
|
101
103
|
*/
|
|
102
104
|
protected postProcessCommits(commits: ConventionalCommit[]): Promise<ConventionalCommit[]>;
|
|
103
105
|
protected buildReleaseNotes(conventionalCommits: ConventionalCommit[], newVersion: Version, newVersionTag: TagName, latestRelease?: Release, commits?: Commit[]): Promise<string>;
|
|
104
|
-
protected buildPullRequestBody(component: string | undefined, newVersion: Version, releaseNotesBody: string, _conventionalCommits: ConventionalCommit[], _latestRelease?: Release, pullRequestHeader?: string): Promise<PullRequestBody>;
|
|
106
|
+
protected buildPullRequestBody(component: string | undefined, newVersion: Version, releaseNotesBody: string, _conventionalCommits: ConventionalCommit[], _latestRelease?: Release, pullRequestHeader?: string, pullRequestFooter?: string): Promise<PullRequestBody>;
|
|
105
107
|
/**
|
|
106
108
|
* Builds a candidate release pull request
|
|
107
109
|
* @param {Commit[]} commits Raw commits to consider for this release.
|
|
@@ -61,6 +61,7 @@ class BaseStrategy {
|
|
|
61
61
|
this.includeVInTag = (_c = options.includeVInTag) !== null && _c !== void 0 ? _c : true;
|
|
62
62
|
this.pullRequestTitlePattern = options.pullRequestTitlePattern;
|
|
63
63
|
this.pullRequestHeader = options.pullRequestHeader;
|
|
64
|
+
this.pullRequestFooter = options.pullRequestFooter;
|
|
64
65
|
this.extraFiles = options.extraFiles || [];
|
|
65
66
|
this.initialVersion = options.initialVersion;
|
|
66
67
|
this.extraLabels = options.extraLabels || [];
|
|
@@ -118,14 +119,17 @@ class BaseStrategy {
|
|
|
118
119
|
commits: commits,
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
|
-
async buildPullRequestBody(component, newVersion, releaseNotesBody, _conventionalCommits, _latestRelease, pullRequestHeader) {
|
|
122
|
+
async buildPullRequestBody(component, newVersion, releaseNotesBody, _conventionalCommits, _latestRelease, pullRequestHeader, pullRequestFooter) {
|
|
122
123
|
return new pull_request_body_1.PullRequestBody([
|
|
123
124
|
{
|
|
124
125
|
component,
|
|
125
126
|
version: newVersion,
|
|
126
127
|
notes: releaseNotesBody,
|
|
127
128
|
},
|
|
128
|
-
], {
|
|
129
|
+
], {
|
|
130
|
+
header: pullRequestHeader,
|
|
131
|
+
footer: pullRequestFooter,
|
|
132
|
+
});
|
|
129
133
|
}
|
|
130
134
|
/**
|
|
131
135
|
* Builds a candidate release pull request
|
|
@@ -169,7 +173,7 @@ class BaseStrategy {
|
|
|
169
173
|
commits: conventionalCommits,
|
|
170
174
|
});
|
|
171
175
|
const updatesWithExtras = (0, composite_1.mergeUpdates)(updates.concat(...(await this.extraFileUpdates(newVersion, versionsMap))));
|
|
172
|
-
const pullRequestBody = await this.buildPullRequestBody(component, newVersion, releaseNotesBody, conventionalCommits, latestRelease, this.pullRequestHeader);
|
|
176
|
+
const pullRequestBody = await this.buildPullRequestBody(component, newVersion, releaseNotesBody, conventionalCommits, latestRelease, this.pullRequestHeader, this.pullRequestFooter);
|
|
173
177
|
return {
|
|
174
178
|
title: pullRequestTitle,
|
|
175
179
|
body: pullRequestBody,
|
|
@@ -34,17 +34,20 @@ const CHANGELOG_SECTIONS = [
|
|
|
34
34
|
const DEFAULT_CHANGELOG_PATH = 'docs/history.md';
|
|
35
35
|
const DEFAULT_PULL_REQUEST_TITLE_PATTERN = 'Release${component} version ${version}';
|
|
36
36
|
const DEFAULT_PULL_REQUEST_HEADER = ':robot: I have created a release *beep* *boop*';
|
|
37
|
+
const DEFAULT_PULL_REQUEST_FOOTER = 'This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).';
|
|
37
38
|
const RELEASE_NOTES_HEADER_PATTERN = /#{2,3} \[?(\d+\.\d+\.\d+-?[^\]]*)\]?.* \((\d{4}-\d{2}-\d{2})\)/;
|
|
38
39
|
class DotnetYoshi extends base_1.BaseStrategy {
|
|
39
40
|
constructor(options) {
|
|
40
|
-
var _a, _b, _c, _d, _e;
|
|
41
|
+
var _a, _b, _c, _d, _e, _f;
|
|
41
42
|
options.changelogSections = (_a = options.changelogSections) !== null && _a !== void 0 ? _a : CHANGELOG_SECTIONS;
|
|
42
43
|
options.changelogPath = (_b = options.changelogPath) !== null && _b !== void 0 ? _b : DEFAULT_CHANGELOG_PATH;
|
|
43
44
|
options.pullRequestTitlePattern =
|
|
44
45
|
(_c = options.pullRequestTitlePattern) !== null && _c !== void 0 ? _c : DEFAULT_PULL_REQUEST_TITLE_PATTERN;
|
|
45
46
|
options.pullRequestHeader =
|
|
46
47
|
(_d = options.pullRequestHeader) !== null && _d !== void 0 ? _d : DEFAULT_PULL_REQUEST_HEADER;
|
|
47
|
-
options.
|
|
48
|
+
options.pullRequestFooter =
|
|
49
|
+
(_e = options.pullRequestFooter) !== null && _e !== void 0 ? _e : DEFAULT_PULL_REQUEST_FOOTER;
|
|
50
|
+
options.includeVInTag = (_f = options.includeVInTag) !== null && _f !== void 0 ? _f : false;
|
|
48
51
|
super(options);
|
|
49
52
|
}
|
|
50
53
|
async buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease) {
|
|
@@ -64,6 +64,7 @@ function releaserConfigToJsonConfig(config) {
|
|
|
64
64
|
'changelog-host': config.changelogHost,
|
|
65
65
|
'pull-request-title-pattern': config.pullRequestTitlePattern,
|
|
66
66
|
'pull-request-header': config.pullRequestHeader,
|
|
67
|
+
'pull-request-footer': config.pullRequestFooter,
|
|
67
68
|
'separate-pull-requests': config.separatePullRequests,
|
|
68
69
|
'tag-separator': config.tagSeparator,
|
|
69
70
|
'extra-files': config.extraFiles,
|
|
@@ -127,7 +127,7 @@ function extractMultipleReleases(notes, logger) {
|
|
|
127
127
|
}
|
|
128
128
|
return data;
|
|
129
129
|
}
|
|
130
|
-
const COMPARE_REGEX = /^#{2,} \[?(?<version>\d+\.\d+\.\d
|
|
130
|
+
const COMPARE_REGEX = /^#{2,} \[?(?<version>\d+\.\d+\.\d+[^\]]*)\]?/;
|
|
131
131
|
function extractSingleRelease(body, logger) {
|
|
132
132
|
var _a;
|
|
133
133
|
body = body.trim();
|
package/package.json
CHANGED
package/schemas/config.json
CHANGED
|
@@ -103,6 +103,10 @@
|
|
|
103
103
|
"description": "Customize the release pull request header.",
|
|
104
104
|
"type": "string"
|
|
105
105
|
},
|
|
106
|
+
"pull-request-footer": {
|
|
107
|
+
"description": "Customize the release pull request footer.",
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
106
110
|
"separate-pull-requests": {
|
|
107
111
|
"description": "Open a separate release pull request for each component. Defaults to `false`.",
|
|
108
112
|
"type": "boolean"
|
|
@@ -404,6 +408,7 @@
|
|
|
404
408
|
"changelog-path": true,
|
|
405
409
|
"pull-request-title-pattern": true,
|
|
406
410
|
"pull-request-header": true,
|
|
411
|
+
"pull-request-footer": true,
|
|
407
412
|
"separate-pull-requests": true,
|
|
408
413
|
"tag-separator": true,
|
|
409
414
|
"extra-files": true,
|