Skip to content

Commit

Permalink
Remove leading path from repository names (#13)
Browse files Browse the repository at this point in the history
* Remove leading path from repository name when fetching repo from Codacy
  • Loading branch information
lventura-codacy authored Feb 27, 2025
1 parent a4dd586 commit b4459d0
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,4 +6,4 @@

### Added

- Support for 2024.3 products
- Fixed an issue where repositories using groups/subgroups would not get properly parsed.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ pluginGroup = com.codacy.intellij.plugin
pluginName = codacy-intellij-plugin
pluginRepositoryUrl = https://github.com/codacy/codacy-intellij-extension
# SemVer format -> https://semver.org
pluginVersion = 0.0.4
pluginVersion = 0.0.5

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@ object GitRemoteParser {

val providerName = matcher.group(1)
val organization = matcher.group(2)
val repository = matcher.group(3)

val repository = matcher.group(3).substringAfterLast("/") // Remove any leading path in cases such as Gitlabs subgroups, or default to the repository name
val provider = validProviders[providerName] ?: throw IllegalArgumentException("Invalid provider: $providerName")

return GitRemoteInfo(provider, organization, repository)

0 comments on commit b4459d0

Please sign in to comment.