diff --git a/github.js b/github.js index f3e504d2..8dc42699 100644 --- a/github.js +++ b/github.js @@ -409,14 +409,16 @@ this.commit = function(parent, tree, message, cb) { var data = { "message": message, - "author": { - "name": options.username - }, "parents": [ parent ], "tree": tree }; + if(options.username) { + data.author = { + "name": options.username + }; + } _request("POST", repoPath + "/git/commits", data, function(err, res) { currentTree.sha = res.sha; // update latest commit