QasimWani / LeetHub

Automatically sync your leetcode solutions to your github account - top 5 trending GitHub repository
https://chrome.google.com/webstore/detail/leethub/aciombdipochlnkbpcbgdpjffcfdbggi
MIT License
3.91k stars 1.37k forks source link

[Feature request] Update commit messages / allow custom commit messages #613

Open ekb72-B opened 7 months ago

ekb72-B commented 7 months ago

Please review previous closed issues before filling out a new one! Duplicate issues will be closed without comment.

Is your feature request related to a problem? Please describe. When you initially submit to leetcode, sometimes the run time is not accurate, especially during peak traffic hours. Recording the commit message based on those statistics reflects poorly on someone's solutions even though they may actually be the most efficient.

Describe the solution you'd like Allow users to decide how the commit message looks. I.e. not mentioning the runtime and memory in the commit (due to the fact that it is subject to change as explained above and most times inaccurate during the first run). I, for one would like commit message to just state the problem number and then include the big O, speed, and memory as a comment before the solution code.

Describe alternatives you've considered Alternative would be having a situation where the commit message updates with every run. This would be very sleek as well and would involve git commit --amend in the backend. If this happened, it could be a better solution since the stats will be correct and commit message will be updated to reflect speed and space accurately. The issue here is that it will only work if that was the last commit, but that should not be an issue in the long run and is the preferred solution.

Additional context

Screen Shot 2023-12-31 at 1 08 49 PM

As you can see, the same code ran within minutes of each other results in wildly different times. This means a solution could be erroneously tagged as doing poorly when it actually is very efficient.