From 04f3061bed7374ee956d3ebc36e197a166279a8d Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Tue, 13 Feb 2018 14:27:37 -0500 Subject: [PATCH] fix: remove the github plugin from default success and fail hooks --- lib/definitions/plugins.js | 4 ++-- test/index.test.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/definitions/plugins.js b/lib/definitions/plugins.js index 2e956e3224..98b1b17aca 100644 --- a/lib/definitions/plugins.js +++ b/lib/definitions/plugins.js @@ -47,13 +47,13 @@ module.exports = { }, }, success: { - default: ['@semantic-release/github'], + default: false, config: { validator: conf => !conf || (isArray(conf) ? conf : [conf]).every(conf => validatePluginConfig(conf)), }, }, fail: { - default: ['@semantic-release/github'], + default: false, config: { validator: conf => !conf || (isArray(conf) ? conf : [conf]).every(conf => validatePluginConfig(conf)), }, diff --git a/test/index.test.js b/test/index.test.js index 91603498b7..f1b73109e5 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -596,7 +596,7 @@ test.serial('Returns falsy value if triggered by a PR', async t => { t.falsy(await semanticRelease({repositoryUrl})); t.is( - t.context.log.args[9][0], + t.context.log.args[t.context.log.args.length - 1][0], "This run was triggered by a pull request and therefore a new version won't be published." ); }); @@ -723,8 +723,8 @@ test.serial('Hide sensitive environment variable values from the logs', async t await t.throws(semanticRelease(options)); - t.regex(t.context.stdout.args[9][0], /Console: The token \[secure\] is invalid/); - t.regex(t.context.stdout.args[10][0], /Log: The token \[secure\] is invalid/); + t.regex(t.context.stdout.args[t.context.stdout.args.length - 2][0], /Console: The token \[secure\] is invalid/); + t.regex(t.context.stdout.args[t.context.stdout.args.length - 1][0], /Log: The token \[secure\] is invalid/); t.regex(t.context.stderr.args[0][0], /Error: The token \[secure\] is invalid/); t.regex(t.context.stderr.args[1][0], /Invalid token \[secure\]/); });