From caaea629eba86e5a41980765412ade40a70cd1b9 Mon Sep 17 00:00:00 2001 From: Roman Ivanov Date: Thu, 4 Jul 2024 12:36:09 +0300 Subject: [PATCH] Update Gitea version to 1.22.1 --- gradle.properties | 2 +- .../octopus/vcsfacade/service/impl/GiteaService.kt | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index de53cb9..07b8839 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ springdoc-openapi.version=2.3.0 external-systems-client.version=2.0.43 gitlab4j-api.version=6.0.0-rc.4 bitbucket.version=8.14.0-jdk11 -gitea.version=1.22.0 +gitea.version=1.22.1 gitlab.version=16.2.4-ce.0 postgres.version=13-alpine opensearch.version=2.11.1 diff --git a/server/src/main/kotlin/org/octopusden/octopus/vcsfacade/service/impl/GiteaService.kt b/server/src/main/kotlin/org/octopusden/octopus/vcsfacade/service/impl/GiteaService.kt index d903bc8..6e6302c 100644 --- a/server/src/main/kotlin/org/octopusden/octopus/vcsfacade/service/impl/GiteaService.kt +++ b/server/src/main/kotlin/org/octopusden/octopus/vcsfacade/service/impl/GiteaService.kt @@ -274,9 +274,8 @@ class GiteaService( val organization = giteaRepository.fullName.lowercase().removeSuffix("/$repository") return Repository("ssh://git@$host/$organization/$repository.git", //TODO: add "useColon" parameter? "$httpUrl/$organization/$repository", - //IMPORTANT: - //Gitea version 1.22.0 started to return host url instead of empty string as avatar_url for repository with no avatar - //Will be fixed in 1.22.1, see https://github.com/go-gitea/gitea/pull/31187 + //IMPORTANT: see https://github.com/go-gitea/gitea/pull/31187 + //Gitea versions 1.22.0 and 1.22.1 return host url instead of empty string as avatar_url for repository with no avatar giteaRepository.avatarUrl.let { val path = try { URI(it).path @@ -285,7 +284,7 @@ class GiteaService( } if (path.trim('/').isEmpty()) null else it } - //TODO: restore `giteaRepository.avatarUrl.ifBlank { null }` after Gitea update to 1.22.1 or higher + //TODO: restore `giteaRepository.avatarUrl.ifBlank { null }` after Gitea fix ) }