log.info(MessageFormat.format("Creating commit with SHA-1: {0}", created.getSha()));
} catch (IOException e) {
throw new GitHubException("Error creating commit: " + e.getMessage(), e);
}
TypedResource object = new TypedResource();
object.setType(TYPE_COMMIT).setSha(created.getSha());
if (ref != null) {
// Update existing reference
ref.setObject(object);
try {
log.info(String.format("Updating reference %s from %s to %s", branch, commit.getParents().get(0).getSha(), created.getSha()));