Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for commit prefix #160

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow For Prefix: refactor(api.ts): improve prefix validation by usin…
…g regex instead of startsWith and endsWith methods
  • Loading branch information
amitayk committed May 27, 2023
commit e0d1850c13580802217c6f9ffeb1b75f5940e2bd
4 changes: 3 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
@@ -112,7 +112,9 @@ function generatePrefix(): string | undefined {
return undefined;
}

const prefixIsRegexString = prefix.startsWith('/') && prefix.endsWith('/');

// Prefix is limited to /*/ regex expressions
const prefixIsRegexString = prefix.match(/\/.*\/*/)

if (prefixIsRegexString) {
try {