diff --git a/CHANGELOG.md b/CHANGELOG.md index 658bbcf8db..2bf773afe1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.7.6] - 2025-08-19 +### Fixed +- Support for go-git user agents (e.g. ArgoCD ≥ 2.14) (Patch from 2.46.6) + +## [2.46.6] - 2025-08-19 +### Fixed +- Support for go-git user agents (e.g. ArgoCD ≥ 2.14) + ## [3.9.0] - 2025-08-01 ### Added - Delete and retain functionality for mutable queryable stores @@ -1744,6 +1752,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [2.46.3]: https://scm-manager.org/download/2.46.3 [2.46.4]: https://scm-manager.org/download/2.46.4 [2.46.5]: https://scm-manager.org/download/2.46.5 +[2.46.6]: https://scm-manager.org/download/2.46.6 [2.47.0]: https://scm-manager.org/download/2.47.0 [2.48.0]: https://scm-manager.org/download/2.48.0 [2.48.1]: https://scm-manager.org/download/2.48.1 diff --git a/gradle/changelog/committer_in_squash_merge.yaml b/gradle/changelog/committer_in_squash_merge.yaml new file mode 100644 index 0000000000..bed4dbd6f1 --- /dev/null +++ b/gradle/changelog/committer_in_squash_merge.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: The committer in squash merge, rebase, and regular merge is now set to the current user. diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/web/GitUserAgentProvider.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/web/GitUserAgentProvider.java index ce6395516e..41acbf88ee 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/web/GitUserAgentProvider.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/web/GitUserAgentProvider.java @@ -59,7 +59,12 @@ public class GitUserAgentProvider implements UserAgentProvider { .basicAuthenticationCharset(Charsets.UTF_8) .build(); + private static final String PREFIX_GOGIT = "go-git/"; + @VisibleForTesting + static final UserAgent GOGIT = UserAgent.scmClient("go-git") + .basicAuthenticationCharset(Charsets.UTF_8) + .build(); @Override @@ -74,6 +79,8 @@ public class GitUserAgentProvider implements UserAgentProvider { return GIT_LFS; } else if (isGit(lowerUserAgent)) { return GIT; + } else if (isGoGit(lowerUserAgent)) { + return GOGIT; } else { return null; } @@ -98,4 +105,6 @@ public class GitUserAgentProvider implements UserAgentProvider { private boolean isGit(String userAgent) { return userAgent.startsWith(PREFIX_REGULAR); } + + private boolean isGoGit(String userAgent) { return userAgent.startsWith(PREFIX_GOGIT); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitUserAgentProviderTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitUserAgentProviderTest.java index d0601cacc6..05da458711 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitUserAgentProviderTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitUserAgentProviderTest.java @@ -36,6 +36,7 @@ public class GitUserAgentProviderTest { assertEquals(GitUserAgentProvider.JGIT, parse("jgit/4.5.2")); assertEquals(GitUserAgentProvider.GIT_LFS, parse("git-lfs/2.0.1 (GitHub; windows amd64; go 1.8; git 678cdbd4)")); assertEquals(GitUserAgentProvider.MSYSGIT, parse("git/1.8.3.msysgit.0")); + assertEquals(GitUserAgentProvider.GOGIT, parse("go-git/5.x")); assertNull(parse("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36")); } diff --git a/scm-ui/ui-extensions/src/extensionPoints.tsx b/scm-ui/ui-extensions/src/extensionPoints.tsx index f35f22e585..63b4371bf5 100644 --- a/scm-ui/ui-extensions/src/extensionPoints.tsx +++ b/scm-ui/ui-extensions/src/extensionPoints.tsx @@ -602,7 +602,7 @@ export type RepositorySourcesContentDownloadButton = RenderableExtensionPointDef export type RepositoryRoute = RenderableExtensionPointDefinition< "repository.route", - { repository: Repository; url: string; indexLinks: Links } + { repository: Repository; url: string; indexLinks: Links; urlForLinks: string } >; type RepositoryRedirectProps = { diff --git a/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx b/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx index a421fef750..4cf32c6118 100644 --- a/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx +++ b/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx @@ -343,6 +343,7 @@ const RepositoryRoot = () => { repository, url: urls.escapeUrlForRoute(url), indexLinks, + urlForLinks: url, }} renderAll={true} />