From 1ad0ad76688e4fe50d6d0967b3f391653f3dc62c Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Wed, 15 Jul 2020 01:40:23 +0900 Subject: [PATCH] feat: enhance error message --- 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 +`); } }