Skip to content

Commit b4459d0

Browse files
Remove leading path from repository names (#13)
* Remove leading path from repository name when fetching repo from Codacy
1 parent a4dd586 commit b4459d0

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
### Added
88

9-
- Support for 2024.3 products
9+
- Fixed an issue where repositories using groups/subgroups would not get properly parsed.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginGroup = com.codacy.intellij.plugin
44
pluginName = codacy-intellij-plugin
55
pluginRepositoryUrl = https://github.com/codacy/codacy-intellij-extension
66
# SemVer format -> https://semver.org
7-
pluginVersion = 0.0.4
7+
pluginVersion = 0.0.5
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 223

src/main/kotlin/com/codacy/intellij/plugin/services/common/GitRemoteParser.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ object GitRemoteParser {
2525

2626
val providerName = matcher.group(1)
2727
val organization = matcher.group(2)
28-
val repository = matcher.group(3)
29-
28+
val repository = matcher.group(3).substringAfterLast("/") // Remove any leading path in cases such as Gitlabs subgroups, or default to the repository name
3029
val provider = validProviders[providerName] ?: throw IllegalArgumentException("Invalid provider: $providerName")
3130

3231
return GitRemoteInfo(provider, organization, repository)

0 commit comments

Comments
 (0)