mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 00:56:09 +02:00
Merge tag '2.46.6' into hotfix/3.7.x
Release version 2.46.6
This commit is contained in:
@@ -5,6 +5,10 @@ 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).
|
||||
|
||||
## [2.46.6] - 2025-08-19
|
||||
### Fixed
|
||||
- Support for go-git user agents (e.g. ArgoCD ≥ 2.14)
|
||||
|
||||
## [3.7.5] - 2025-04-14
|
||||
### Fixed
|
||||
- Fix setting of document title for create repository page, if only a translation key was provided
|
||||
@@ -1688,6 +1692,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
|
||||
|
||||
@@ -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); }
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user