mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 12:05:52 +01:00
Improve committer accuracy
Changes made by the SCM-Manager, like those through the editor and pull requests, now more accurately define the committer on the underlying changeset. Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com> Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
This commit is contained in:
committed by
SCM-Manager
parent
8eb2687e10
commit
7e83d34fc0
@@ -91,6 +91,14 @@ public class SvnModifyCommand implements ModifyCommand {
|
||||
}
|
||||
}
|
||||
|
||||
private String getCurrentUserName() {
|
||||
if (SecurityUtils.getSubject() != null && SecurityUtils.getSubject().getPrincipal() != null) {
|
||||
return SecurityUtils.getSubject().getPrincipal().toString();
|
||||
} else {
|
||||
return "SCM-Manager";
|
||||
}
|
||||
}
|
||||
|
||||
private String commitChanges(SVNClientManager clientManager, File workingDirectory, String commitMessage) {
|
||||
try {
|
||||
clientManager.setAuthenticationManager(SVNWCUtil.createDefaultAuthenticationManager(getCurrentUserName(), new char[0]));
|
||||
@@ -110,14 +118,6 @@ public class SvnModifyCommand implements ModifyCommand {
|
||||
}
|
||||
}
|
||||
|
||||
private String getCurrentUserName() {
|
||||
if (SecurityUtils.getSubject() != null && SecurityUtils.getSubject().getPrincipal() != null) {
|
||||
return SecurityUtils.getSubject().getPrincipal().toString();
|
||||
} else {
|
||||
return "SCM-Manager";
|
||||
}
|
||||
}
|
||||
|
||||
private void modifyWorkingDirectory(ModifyCommandRequest request, SVNClientManager clientManager, File workingDirectory) {
|
||||
for (ModifyCommandRequest.PartialRequest partialRequest : request.getRequests()) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user