fix: isProhibitedBranch detection (#394)
Co-authored-by: peaceiris <30958501+peaceiris@users.noreply.github.com>
This commit is contained in:
@@ -83,7 +83,7 @@ Use deploy_key or personal_token.
|
||||
}
|
||||
|
||||
if (eventName === 'push') {
|
||||
isProhibitedBranch = ref.includes(`refs/heads/${publishBranch}`);
|
||||
isProhibitedBranch = ref.match(new RegExp(`^refs/heads/${publishBranch}$`)) !== null;
|
||||
if (isProhibitedBranch) {
|
||||
throw new Error(`You deploy from ${publishBranch} to ${publishBranch}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user