Skip to content

Commit 92e6f44

Browse files
committed
rewire list_branches
1 parent 77695c7 commit 92e6f44

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/github/repositories.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func ListBranches(t translations.TranslationHelperFunc) inventory.ServerTool {
304304
minimalBranches = append(minimalBranches, convertToMinimalBranch(branch))
305305
}
306306

307-
r, err := json.Marshal(minimalBranches)
307+
r, err := response.MarshalItems(minimalBranches)
308308
if err != nil {
309309
return nil, nil, fmt.Errorf("failed to marshal response: %w", err)
310310
}

pkg/response/optimize.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const maxFlattenDepth = 2
2020
// Keys are matched against post-flatten map keys, so for nested fields like "user.html_url", the dotted key must be
2121
// added explicitly. Empty collections are still dropped. Wins over collectionFieldExtractors.
2222
var preservedFields = map[string]bool{
23-
"html_url": true,
24-
"draft": true,
23+
"html_url": true,
24+
"draft": true,
2525
"prerelease": true,
2626
}
2727

0 commit comments

Comments
 (0)