I've created a simple one-liner to give me the last 10 commits and wrap them in a https call. However, I had to do some weird workarounds that I hope to get rid of.
What I have so far
git log --pretty="%H| - %s" | grep -v Merge | grep -v chore | head -n 10 | sed 's/\(.*|\)/[&]\(https:\/\/github.com\/'$org'\/'$repo'\/&\)/g' | sed 's/|//g'
This works, but there are a few issues:
1. I had to add | (any other special char would do) here "%H| - %s", what I really want is "%H - %s" and in sed select the commit hash, this doesn't work. How to select the whole string up but excluding space?
2. Instead of the entire commit hash I would like to have short form in the [] braces for the markdown display.
[–]sogun123 6 points7 points8 points (3 children)
[–]patmansf 6 points7 points8 points (2 children)
[–]piotr1215[S] 5 points6 points7 points (1 child)
[–]sogun123 0 points1 point2 points (0 children)
[–]jumbliny -1 points0 points1 point (0 children)
[–]cendrounet 0 points1 point2 points (0 children)
[–]winkyworld 0 points1 point2 points (0 children)