Created
February 5, 2021 06:25
-
-
Save fomkin/b412146b7214b65661a15b1e849cf154 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/amm | |
import ammonite.ops._ | |
import ammonite.ops.ImplicitWd._ | |
val issue = "#(\\d+)".r | |
@main def main( | |
tag: String = %%("git", "describe", "--abbrev=0", "--tags").out.trim) = { | |
%%('git, 'log, "--pretty=oneline", s"$tag...HEAD") | |
.out | |
.lines | |
.groupBy(x => issue.findAllIn(x).toSeq) | |
.foreach { | |
case (Nil, xs) => | |
println("_") | |
xs.foreach(s => println(s" $s")) | |
case (issues, xs) => | |
println(issues.mkString(", ")) | |
xs.foreach(s => println(s" $s")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment