Skip to content

spread-the-code/git-commiter-nodejs

Repository files navigation

Build Status Coverage Status

A nodejs server that recieve files and commit them to github repo

Installation

Local

  1. npm install
  2. npm start
  3. POST the payload (below) to http//localhost:3000/commit

Production

Recommended way - git clone and deploy with a ci system
(such as heroku . Read the guide)

Usage

POST this payload:

{
  "remoteRepo": "{owner}/{repository_name}",
  "token": "{personal_access_token}",
  "commitMessage": "{commit_message}",
  "files": [
    {
      "path": "path/to/first-file.txt",
      "content": "content of first-file.txt"
    },
    {
      "path": "path/to/second-file.txt",
      "content": "content of second-file.txt"
    }
  ]
}

personal_access_token - Meant to allow the server to commit on your behalf. How do I get this token?