]> git.frustrated-labs.net Git - gradle-changelog-plugin.git/blob
aaff8593aea105784085b5ed2941e4f7a791e029
[gradle-changelog-plugin.git] /
1 package io.github.aloussase.changelog.git
2
3 class GetCurrentBranchCommitsCommand : AbstractGitCommand<List<Pair<String, String>>>() {
4     override val commandLine: String
5         get() = "git log main..HEAD --no-merges --oneline --pretty=format:\"%an|%s\""
6
7     override fun transform(rawOutput: String): List<Pair<String, String>> =
8         rawOutput
9             .split("\n")
10             .map { it.split("|") }
11             .map { Pair(it[0], it[1]) }
12 }