mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-07 23:29:10 +01:00
Fix branch overview page (#1963)
This commit is contained in:
2
gradle/changelog/branch_overview.yaml
Normal file
2
gradle/changelog/branch_overview.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
- type: fixed
|
||||
description: Branch decoding in overview ([#1963](https://github.com/scm-manager/scm-manager/pull/1963))
|
||||
@@ -169,7 +169,7 @@ public class BranchDetailsResource {
|
||||
@QueryParam("branches") List<@Length(min = 1, max = 100) @Pattern(regexp = VALID_BRANCH_NAMES) String> branches
|
||||
) {
|
||||
try (RepositoryService service = serviceFactory.create(new NamespaceAndName(namespace, name))) {
|
||||
List<BranchDetailsDto> dtos = getBranchDetailsDtos(service, decodeBranchNames(branches));
|
||||
List<BranchDetailsDto> dtos = getBranchDetailsDtos(service, branches);
|
||||
Links links = Links.linkingTo().self(resourceLinks.branchDetailsCollection().self(namespace, name)).build();
|
||||
Embedded embedded = Embedded.embeddedBuilder().with("branchDetails", dtos).build();
|
||||
|
||||
@@ -194,8 +194,4 @@ public class BranchDetailsResource {
|
||||
}
|
||||
return dtos;
|
||||
}
|
||||
|
||||
private Collection<String> decodeBranchNames(Collection<String> branches) {
|
||||
return branches.stream().map(HttpUtil::decode).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user