Skip to content

Commit

Permalink
refactor(bazel): Simplify expandRepositoryUrl() a bit
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Jul 1, 2024
1 parent dc12ef2 commit 37f4aa5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions plugins/package-managers/bazel/src/main/kotlin/Bazel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,7 @@ class Bazel(
)
}

private fun String.expandRepositoryUrl(): String =
if (startsWith("github:")) {
val path = substringAfter("github:")
"https://github.com/$path"
} else {
this
}
private fun String.expandRepositoryUrl(): String = withoutPrefix("github:")?.let { "https://github.com/$it" } ?: this

private fun ModuleMetadata.toVcsInfo() =
VcsInfo(
Expand Down

0 comments on commit 37f4aa5

Please sign in to comment.