commit-to-github

0.2.3 • Public • Published

commit-to-github

Uses the github API to make commits to github repos. lightweight and doesn't depend on Git.

Installation

$ npm install commit-to-github

Example

commitToGithub({
    user: "Ramshackle-Jamathon",
    repo: "commit-to-github",
    token: "<a-github-oauth-token>",
    files: [
        {path: "foo.txt", content: "nice words!"},
        {path: "sick-folder/bar.txt", content: "you're the best!"},
    ],
    fullyQualifiedRef : "heads/master", //optional default = "heads/dev"
    forceUpdate: true, //optional default = false
    commitMessage: "great work!" //option default = "AutoCommit - " + new Date().getTime().toString();
}).then(function(res){
    // success!
}).catch(function(err){
    // oh no! something went wrong
})

Badges

Readme

Keywords

Package Sidebar

Install

npm i commit-to-github

Weekly Downloads

1

Version

0.2.3

License

MIT

Last publish

Collaborators

  • ramshackle-jamathon