in src/main/java/com/spotify/github/v3/clients/GitDataClient.java [200:222]
public CompletableFuture<Tag> createAnnotatedTag(
final String tag,
final String sha,
final String tagMessage,
final String taggerName,
final String taggerEmail) {
final String tagPath = format(CREATE_REFERENCE_TAG, owner, repo);
final ImmutableMap<String, Object> body =
of(
"tag", tag,
"message", tagMessage,
"object", sha,
"type", "commit",
"tagger",
of(
"name", taggerName,
"email", taggerEmail,
"date", Instant.now().toString()));
return github.post(tagPath, github.json().toJsonUnchecked(body), Tag.class)
.thenCompose(tagCreated ->
createTagReference(tag, tagCreated.sha())
.thenApply(reference -> tagCreated));
}