Compare commits

...
2 Commits
3 changed files with 9 additions and 5 deletions
+3 -3
View File
@@ -71,9 +71,9 @@ module.exports = {
pipelineConfig: () => ({
// Add `nextRelease` and plugin properties to published release
transform: (release, step, {nextRelease}) => ({
...(isPlainObject(release) ? release : {}),
...nextRelease,
...(release === false ? {} : step),
...(release === false ? {} : nextRelease),
...release,
...step,
}),
}),
},
+1 -1
View File
@@ -24,7 +24,7 @@
"@semantic-release/github": "^5.1.0",
"@semantic-release/npm": "^5.0.5",
"@semantic-release/release-notes-generator": "^7.1.2",
"aggregate-error": "^1.0.0",
"aggregate-error": "^2.0.0",
"cosmiconfig": "^5.0.1",
"debug": "^4.0.0",
"env-ci": "^3.0.0",
+5 -1
View File
@@ -712,6 +712,7 @@ test('Accept "undefined" value returned by "generateNotes" and "false" by "publi
const notes2 = 'Release notes 2';
const generateNotes2 = stub().resolves(notes2);
const publish = stub().resolves(false);
const success = stub().resolves();
const options = {
branch: 'master',
@@ -722,7 +723,7 @@ test('Accept "undefined" value returned by "generateNotes" and "false" by "publi
generateNotes: [generateNotes1, generateNotes2],
prepare: stub().resolves(),
publish,
success: stub().resolves(),
success,
fail: stub().resolves(),
};
@@ -754,6 +755,9 @@ test('Accept "undefined" value returned by "generateNotes" and "false" by "publi
t.is(publish.callCount, 1);
t.deepEqual(publish.args[0][1].lastRelease, lastRelease);
t.is(publish.args[0][1].nextRelease.notes, notes2);
t.is(success.callCount, 1);
t.deepEqual(success.args[0][1].releases, [{pluginName: '[Function: proxy]'}]);
});
test('Returns false if triggered by a PR', async t => {