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
Update src/api.ts
Improve generatePrefixFromRegex function to handle capturing groups

Co-authored-by: Takuya Ono <takuya-o@users.osdn.me>
  • Loading branch information
amitayk and takuya-o authored May 7, 2023
commit 2577ec1f88f185902e74ebf3cbf4fd0702009735
2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ function generatePrefixFromRegex(regex: string): string | undefined {
return undefined;
}

return match[0];
return match.length > 1 ? match[1] : match[0];
}

function getCurrentGitBranch(): string | undefined {