fun findCommitWithType()

in bunch-cli/src/main/kotlin/org/jetbrains/bunches/utils.kt [7:11]


fun findCommitWithType(file: String, commits: List<CommitInfo>, type: DiffEntry.ChangeType): CommitInfo? {
    return commits.firstOrNull {
        it.fileActions.any { action -> action.changeType == type && action.newPath == file }
    }
}