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

fix(tabby-agent): remove code block delimiters from commit message #3004

Merged

Conversation

Sma1lboy
Copy link
Collaborator

@Sma1lboy Sma1lboy commented Aug 28, 2024

Solving this issue #3002 by adding one line of code, xd

btw, the commit message for this one was automatically generated by Tabby.

@wsxiaoys wsxiaoys requested a review from icycodes August 28, 2024 04:26
@icycodes
Copy link
Member

icycodes commented Aug 28, 2024

The responseMatcher RegExp should already handle this case.

/(?<=(["'`]+)?\s*)(feat|fix|docs|refactor|style|test|build|ci|chore)(\(\w+\))?:.+(?=\s*\1)/gi

@icycodes
Copy link
Member

Ah, I see the case you provided in #3002

```
refactor(tabby-agent): remove unused utility function and update regex creation
- xxxxxxx
- xxxx
- xxxx
```

For the current response matcher:

  1. It does not match multiline commit message.
  2. It does not accept the scope tabby-agent, as it contains non-word char -

I think we can update the response matcher to fix it

/(?<=(["'`]+)?\s*)(feat|fix|docs|refactor|style|test|build|ci|chore)(\(\S+\))?:.+(?=\s*\1)/gis

@Sma1lboy Sma1lboy force-pushed the fix-commit-generator-message-delimiters branch from bd5b116 to 94cd8ae Compare August 29, 2024 01:46
@icycodes icycodes merged commit e610e28 into TabbyML:main Aug 29, 2024
4 checks passed
@Sma1lboy Sma1lboy deleted the fix-commit-generator-message-delimiters branch August 29, 2024 18:48
icycodes pushed a commit that referenced this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants