Skip to content

Instantly share code, notes, and snippets.

@fomkin
Created February 5, 2021 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fomkin/b412146b7214b65661a15b1e849cf154 to your computer and use it in GitHub Desktop.
Save fomkin/b412146b7214b65661a15b1e849cf154 to your computer and use it in GitHub Desktop.
#!/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