Add support to detect Assisted-By trailer#33
Conversation
MoralCode
left a comment
There was a problem hiding this comment.
This change diff feels like it is rewriting lots of the other functions that are checking for signs of other AI related uses besides Assisted-By trailiers.
I like the additional unit tests, but If theres additional formatting/refactoring changes that need to be made, I'd like those to be explained in the PR description or discussed beforehand.
Is there anything preventing this change from being a handful of lines of new unit tests and a smaller handful of lines to add a new entry to the commitMessagePatterns list that satisfies the unit tests?
|
Thanks Adrian, I've added a Changes list to PR description above, which should hopefully answer all questions related to other function changes. Kindly go through it and let me know if you've any follow-up questions. |
|
Thanks for the detailed writeup. I agree with Adrian that the diff is larger than it needs to be. The root issue is that A few other things:
I'd suggest making |
|
Thanks for the detailed review, I'll update the PR accordingly. |
c707d90 to
e59e9dc
Compare
|
@andrew I've updated the PR as per your suggestions here. Please find all changes in description here. Thanks. |
|
i see this new version adds an entirely new type of detector for assisted by trailers. I dont see why this needs to be a whole new detector.
|
Signed-off-by: Omkar P <45419097+omkar-foss@users.noreply.github.com>
e59e9dc to
d90cf1e
Compare
MoralCode
left a comment
There was a problem hiding this comment.
This does not require a new detector, we already have a detector for commit messages
| foundAssistedBy := false | ||
| for _, f := range result.Findings { | ||
| if f.Detector == "coauthor" && f.Tool == "Claude Code" { | ||
| if f.Detector == "coauthor" && f.Tool == "Cursor" { |
There was a problem hiding this comment.
Tool has been changed to Cursor here as commit 4 (instead of 2) is being read now, see this updated test commit which has both Co-Authored-By and multiple Assisted-By.
I see two main reasons why we should keep it in a separate detector:
Also this was suggested in @andrew's suggestions comment which I've fully incorporated:
|
|
Additionally I think So these are separate concerns and we should try to keep them separate to encourage the fact that newcomers can easily develop and maintain them separately. |
Closes #28.
This PR adds support for detecting one or more Assisted-By trailers in git commit message. Also includes tests for supported cases.
Changes (updated as per suggestions here):
assistedbyalongsidecoauthor