From 3d656402e52a96a0c027e4ad98f3ce06da7f8c1b Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Wed, 15 Jul 2020 02:04:43 +0900 Subject: [PATCH] feat: enhance error message (#398) --- src/set-tokens.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/set-tokens.ts b/src/set-tokens.ts index abe099761..073be4de2 100644 --- a/src/set-tokens.ts +++ b/src/set-tokens.ts @@ -85,7 +85,10 @@ Use deploy_key or personal_token. if (eventName === 'push') { isProhibitedBranch = ref.match(new RegExp(`^refs/heads/${publishBranch}$`)) !== null; if (isProhibitedBranch) { - throw new Error(`You deploy from ${publishBranch} to ${publishBranch}`); + throw new Error(`\ +You deploy from ${publishBranch} to ${publishBranch} +This operation is prohibited to protect your contents +`); } }