ianlewis / todos

Parse TODO and FIXME comments from code
Apache License 2.0
26 stars 2 forks source link

[feature] Show creator of a todo #1480

Closed anbraten closed 2 months ago

anbraten commented 5 months ago

Is your feature request related to a problem? Please describe. In larger projects it would be quite nice to see who added a todo, to maybe be able to later on filter on my own todos.

Describe the solution you'd like In case no username was detected / or maybe always check which git commit added the specific line initially which would the creator / person who cares for it in most cases.

Describe alternatives you've considered I could simply add my user to all todo comments. This would however prevent me from adding a #issue,

ianlewis commented 5 months ago

@anbraten Where would you expect the author of the todo to come from?

anbraten commented 5 months ago

Sth like git blame -w --porcelain --incremental -L 23,23 server/store/store.go.

I got this idea from tickgit which is using the git blame command in the code.

anbraten commented 2 months ago

Thanks for adding this

ianlewis commented 1 month ago

Thanks for adding this

LMK if it's close to what you wanted. Right now it only looks at the last commit author to have updated the TODO line (e.g. git blame). It doesn't do anything fancy like try to figure out who the original author of the line was (this is pretty tricky).

Even still, the git blame is still quite slow for anything but small repositories. I've looked a bit at improving the speed of go-git's blame feature but haven't had much time as it is.

ianlewis commented 1 month ago

@anbraten also BTW, it's now released in 0.9.0.