@d2k/commit

0.0.1 • Public • Published

Commit

Octokat Extension for easy commiting

Installation

npm i octokat @d2k/commit --save

or

yarn add octokat @d2k/commit

Usage

// Require packages
const Octokat = require('octokat')
const Commit = require('commit')

// Create new Instance
const OctokatInstance = new Octokat({ token: YOUR_API_TOKEN })

// Create Commit Object
const newCommit = new Commit({
  username: 'your_github_username',
  repo: 'your_github_repository',
  branch: 'target_branch',
  changes: { "file-one.html": "<h1>Hello</h1>", "file-two.html": "<h2>World</h2>" },
  message: "My first Commit"
})

// Submit Commit
newCommit.commit()
  .then(response => console.log(response))
  .catch(err => console.log(err))

Package Sidebar

Install

npm i @d2k/commit

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

3.6 kB

Total Files

3

Last publish

Collaborators

  • d2k