release-please 13.8.0 → 13.8.1
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
|
+
### [13.8.1](https://github.com/googleapis/release-please/compare/v13.8.0...v13.8.1) (2022-04-11)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* Restore v12 changelog formatting for ruby-yoshi ([#1361](https://github.com/googleapis/release-please/issues/1361)) ([ff87c7d](https://github.com/googleapis/release-please/commit/ff87c7df00b652512641454ead34bb2cede2f67e))
|
|
13
|
+
|
|
7
14
|
## [13.8.0](https://github.com/googleapis/release-please/compare/v13.7.1...v13.8.0) (2022-03-31)
|
|
8
15
|
|
|
9
16
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseStrategy, BuildUpdatesOptions, BaseStrategyOptions } from './base';
|
|
2
|
-
import { ConventionalCommit } from '../commit';
|
|
2
|
+
import { ConventionalCommit, Commit } from '../commit';
|
|
3
3
|
import { Update } from '../update';
|
|
4
4
|
import { Release } from '../release';
|
|
5
|
+
import { TagName } from '../util/tag-name';
|
|
5
6
|
import { Version } from '../version';
|
|
6
|
-
import { PullRequestBody } from '../util/pull-request-body';
|
|
7
7
|
interface RubyYoshiStrategyOptions extends BaseStrategyOptions {
|
|
8
8
|
versionFile?: string;
|
|
9
9
|
}
|
|
@@ -12,6 +12,6 @@ export declare class RubyYoshi extends BaseStrategy {
|
|
|
12
12
|
constructor(options: RubyYoshiStrategyOptions);
|
|
13
13
|
protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
|
|
14
14
|
protected postProcessCommits(commits: ConventionalCommit[]): Promise<ConventionalCommit[]>;
|
|
15
|
-
protected
|
|
15
|
+
protected buildReleaseNotes(conventionalCommits: ConventionalCommit[], newVersion: Version, newVersionTag: TagName, latestRelease?: Release, commits?: Commit[]): Promise<string>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -22,9 +22,6 @@ const version_rb_1 = require("../updaters/ruby/version-rb");
|
|
|
22
22
|
const base_1 = require("./base");
|
|
23
23
|
const fs_1 = require("fs");
|
|
24
24
|
const path_1 = require("path");
|
|
25
|
-
const manifest_1 = require("../manifest");
|
|
26
|
-
const logger_1 = require("../util/logger");
|
|
27
|
-
const pull_request_body_1 = require("../util/pull-request-body");
|
|
28
25
|
const CHANGELOG_SECTIONS = [
|
|
29
26
|
{ type: 'feat', section: 'Features' },
|
|
30
27
|
{ type: 'fix', section: 'Bug Fixes' },
|
|
@@ -80,49 +77,17 @@ class RubyYoshi extends base_1.BaseStrategy {
|
|
|
80
77
|
});
|
|
81
78
|
return commits;
|
|
82
79
|
}
|
|
83
|
-
async
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const splitMessage = commit.message.split('\n');
|
|
95
|
-
summary += `* [${splitMessage[0]}](https://github.com/${repoUrl}/commit/${commit.sha})\n`;
|
|
96
|
-
if (splitMessage.length > 2) {
|
|
97
|
-
summary = `${summary}<pre><code>${splitMessage
|
|
98
|
-
.slice(1)
|
|
99
|
-
.join('\n')}</code></pre>\n`;
|
|
100
|
-
}
|
|
101
|
-
if (commit.files === undefined) {
|
|
102
|
-
logger_1.logger.error('No files for commit - this is likely a bug.');
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
commit.files.forEach(file => {
|
|
106
|
-
if (this.path === manifest_1.ROOT_PROJECT_PATH || file.startsWith(this.path)) {
|
|
107
|
-
updatedFiles[file] = true;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
// summarize the files that changed:
|
|
112
|
-
summary = `${summary}\n### Files edited since last release:\n\n<pre><code>`;
|
|
113
|
-
Object.keys(updatedFiles).forEach(file => {
|
|
114
|
-
summary += `${file}\n`;
|
|
115
|
-
});
|
|
116
|
-
summary += `</code></pre>\n[Compare Changes](https://github.com/${repoUrl}/compare/${latestRelease.sha}...HEAD)\n`;
|
|
117
|
-
return new pull_request_body_1.PullRequestBody([
|
|
118
|
-
{
|
|
119
|
-
component,
|
|
120
|
-
version: newVersion,
|
|
121
|
-
notes: releaseNotesBody,
|
|
122
|
-
},
|
|
123
|
-
], {
|
|
124
|
-
extra: summary,
|
|
125
|
-
});
|
|
80
|
+
async buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits) {
|
|
81
|
+
const releaseNotes = await super.buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits);
|
|
82
|
+
return (releaseNotes
|
|
83
|
+
// Remove links in version title line and standardize on h3
|
|
84
|
+
.replace(/^###? \[([\d.]+)\]\([^)]*\)/gm, '### $1')
|
|
85
|
+
// Remove PR and commit links from pull request title suffixes
|
|
86
|
+
.replace(/ \(\[#\d+\]\([^)]*\)\)( \(\[\w+\]\([^)]*\)\))?\s*$/gm, '')
|
|
87
|
+
// Standardize on h4 for change type subheaders
|
|
88
|
+
.replace(/^### (Features|Bug Fixes|Documentation)$/gm, '#### $1')
|
|
89
|
+
// Collapse 2 or more blank lines
|
|
90
|
+
.replace(/\n{3,}/g, '\n\n'));
|
|
126
91
|
}
|
|
127
92
|
}
|
|
128
93
|
exports.RubyYoshi = RubyYoshi;
|