philschatz / octokat.js

:octocat: Github API Client using Promises or callbacks. Intended for the browser or NodeJS.
http://philschatz.com/2014/05/25/octokat/
MIT License
421 stars 133 forks source link

Empty commits #206

Closed NullDev closed 6 years ago

NullDev commented 6 years ago

Could there be an implementation for making empty commits? Basically that:

$ git commit --allow-empty -m "Test Commit in Repo X"

Maybe by not passing a file?

var oct = require('octokat');
var git = new oct({ username: "XXX", password: "YYY" });
var r = git.repos("XXX", "test-repo");
r.contents(null).add({ message: "test commit" });

If this can't be implemented, is there a way to change a commit message?