Skip to content

Commit d48ce02

Browse files
committed
Consider commit messages.
1 parent 6a8aa85 commit d48ce02

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

github.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Github.js 0.1.1
2-
// (c) 2012 Michael Aufreiter, Development Seed
3-
// Github.js is freely distributable under the MIT license.
4-
// For all details and documentation:
5-
// http://substance.io/michael/github
1+
// Github.js 0.1.2
2+
// (c) 2012 Michael Aufreiter, Development Seed
3+
// Github.js is freely distributable under the MIT license.
4+
// For all details and documentation:
5+
// http://substance.io/michael/github
66

77
(function() {
88
var Github;
@@ -116,11 +116,11 @@
116116
// Create a new commit object with the current commit SHA as the parent
117117
// and the new tree SHA, getting a commit SHA back
118118

119-
function createCommit(parent, tree, cb) {
119+
function createCommit(parent, tree, message, cb) {
120120
var data = {
121-
"message": "Spooky. Isn't it?",
121+
"message": message,
122122
"author": {
123-
"name": "Ghost"
123+
"name": username
124124
},
125125
"parents": [
126126
parent
@@ -195,12 +195,12 @@
195195
// Write file contents on a given path
196196
// -------
197197

198-
this.write = function(path, content, cb) {
198+
this.write = function(path, content, message, cb) {
199199
getLatestCommit(function(err, latestCommit) {
200200
getTree(latestCommit, function(err, tree) {
201201
postBlob(content, function(err, blob) {
202202
postTree(tree, path, blob, function(err, tree) {
203-
createCommit(latestCommit, tree, function(err, commit) {
203+
createCommit(latestCommit, tree, message, function(err, commit) {
204204
updateHead(commit, function(err) {
205205
cb(err);
206206
});

0 commit comments

Comments
 (0)