Skip to content

Commit 024f85b

Browse files
committed
fix: use correct type in GitDataClient::updateReference body
1 parent fb07380 commit 024f85b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/spotify/github/v3/clients/GitDataClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ public CompletableFuture<Reference> createTagReference(final String tag, final S
198198
*/
199199
public CompletableFuture<Reference> updateReference(final String ref, final String sha, final boolean force) {
200200
final String path = format(REFERENCE_URI, owner, repo, ref);
201-
final ImmutableMap<String, String> body =
201+
final ImmutableMap<String, Object> body =
202202
of(
203203
"sha", sha,
204-
"force", Boolean.toString(force));
204+
"force", force);
205205
return github.patch(path, github.json().toJsonUnchecked(body), Reference.class);
206206
}
207207

src/test/java/com/spotify/github/v3/clients/GitDataClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ public void createTagReference() throws Exception {
184184
public void updateReference() throws Exception {
185185
final CompletableFuture<Reference> fixture =
186186
completedFuture(json.fromJson(getFixture("branch.json"), Reference.class));
187-
final ImmutableMap<String, String> body =
187+
final ImmutableMap<String, Object> body =
188188
of(
189189
"sha", "aa218f56b14c9653891f9e74264a383fa43fefbd",
190-
"force", "false");
190+
"force", false);
191191
when(github.patch(
192192
"/repos/someowner/somerepo/git/refs/featureA",
193193
github.json().toJsonUnchecked(body),

0 commit comments

Comments
 (0)