diff --git a/src/main/java/com/spotify/github/v3/clients/GitDataClient.java b/src/main/java/com/spotify/github/v3/clients/GitDataClient.java index 6f7fda03..422468a1 100644 --- a/src/main/java/com/spotify/github/v3/clients/GitDataClient.java +++ b/src/main/java/com/spotify/github/v3/clients/GitDataClient.java @@ -198,10 +198,10 @@ public CompletableFuture createTagReference(final String tag, final S */ public CompletableFuture updateReference(final String ref, final String sha, final boolean force) { final String path = format(REFERENCE_URI, owner, repo, ref); - final ImmutableMap body = + final ImmutableMap body = of( "sha", sha, - "force", Boolean.toString(force)); + "force", force); return github.patch(path, github.json().toJsonUnchecked(body), Reference.class); } diff --git a/src/test/java/com/spotify/github/v3/clients/GitDataClientTest.java b/src/test/java/com/spotify/github/v3/clients/GitDataClientTest.java index 1ef3dfdd..99aed15d 100644 --- a/src/test/java/com/spotify/github/v3/clients/GitDataClientTest.java +++ b/src/test/java/com/spotify/github/v3/clients/GitDataClientTest.java @@ -184,10 +184,10 @@ public void createTagReference() throws Exception { public void updateReference() throws Exception { final CompletableFuture fixture = completedFuture(json.fromJson(getFixture("branch.json"), Reference.class)); - final ImmutableMap body = + final ImmutableMap body = of( "sha", "aa218f56b14c9653891f9e74264a383fa43fefbd", - "force", "false"); + "force", false); when(github.patch( "/repos/someowner/somerepo/git/refs/featureA", github.json().toJsonUnchecked(body),