Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ public CompletableFuture<Reference> createTagReference(final String tag, final S
*/
public CompletableFuture<Reference> updateReference(final String ref, final String sha, final boolean force) {
final String path = format(REFERENCE_URI, owner, repo, ref);
final ImmutableMap<String, String> body =
final ImmutableMap<String, Object> body =
of(
"sha", sha,
"force", Boolean.toString(force));
"force", force);
return github.patch(path, github.json().toJsonUnchecked(body), Reference.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ public void createTagReference() throws Exception {
public void updateReference() throws Exception {
final CompletableFuture<Reference> fixture =
completedFuture(json.fromJson(getFixture("branch.json"), Reference.class));
final ImmutableMap<String, String> body =
final ImmutableMap<String, Object> body =
of(
"sha", "aa218f56b14c9653891f9e74264a383fa43fefbd",
"force", "false");
"force", false);
when(github.patch(
"/repos/someowner/somerepo/git/refs/featureA",
github.json().toJsonUnchecked(body),
Expand Down