joshcai / leetcode-sync

GitHub Action for syncing LeetCode submissions to GitHub
293 stars 59 forks source link

feat: adding problem title to commit message #64

Closed matheusaraujo closed 2 weeks ago

matheusaraujo commented 2 weeks ago

Hey guys, first of all, really nice job here! 👏 I'm using and loving it! 🚀

There's only one little thing that, in my opinion, could be improved: include the problem title on the commit message, it would make easier to find the problem on git history.

I've made this simple change to achieve it.

But since this is a very personal preference, I believe a more generic solution would be better.

My idea is having an input variable commit-message-template replacing the existing commit-header. On this variable the pre-defined available infos could be defined using a template string, the default value could be exact like [LeetCode Sync] - Runtime - ${submission.runtime} (${submission.runtimePerc}), Memory - ${submission.memory} (${submission.memoryPerc}), keeping the current behavior, but also improving the flexibility.

I haven't implemented yet just because of time, the current forked works well for me. But, if you guys also believes that this is a good idea, I can try to implement it!

joshcai commented 2 weeks ago

Thanks for the contribution @matheusaraujo! Apologies in the delay in reviewing, but I think this looks great for now. If other users decide they want more flexibility in the commit message, that could be an additional feature added later - will go ahead and merge this.

matheusaraujo commented 2 weeks ago

Great, @joshcai! Thanks for the update! Do you already know when a new release will be created?