File tree 2 files changed +2
-2
lines changed
danger-kotlin-library/src/main/kotlin/systems/danger/kotlin
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 12
12
-->
13
13
14
14
## Master
15
-
15
+ - Fix invalid parsing of changes in diff [ @ davidbilik ] [ ] - [ # 106 ] ( https://github.com/danger/kotlin/pull/106 )
16
16
- Add extensions for changed lines in Git [ @davidbilik ] [ ] - [ #102 ] ( https://github.com/danger/kotlin/pull/102 )
17
17
- Add exec function [ @f-meloni ] [ ] - [ #97 ] ( https://github.com/danger/kotlin/pull/97 )
18
18
- Add readFile function [ @f-meloni ] [ ] - [ #93 ] ( https://github.com/danger/kotlin/pull/93 )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ val Git.changedLines: PullRequestChangedLines
14
14
.filter { it.isNotEmpty() }
15
15
.map { line ->
16
16
val parts = line.split(" \\ s+" .toRegex())
17
- parts[0 ].toInt () to parts[1 ].toInt( )
17
+ ( parts[0 ].toIntOrNull () ? : 0 ) to ( parts[1 ].toIntOrNull() ? : 0 )
18
18
}
19
19
val additions = additionDeletionPairs.fold(0 ) { acc, (addition, _) -> acc + addition }
20
20
val deletions = additionDeletionPairs.fold(0 ) { acc, (_, deletion) -> acc + deletion }
You can’t perform that action at this time.
0 commit comments