0.1.1 • Published 4 months ago

webcommit v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

webcommit

Self-contained library to commit into GitHub.

Author: Oleg Mihailik @oyin.bo.

Using with no dependencies:

const prepare = await webcommit({
  owner: 'oyin-bo',
  repo: 'webcommit',
  branch: 'test',
  auth: prompt('GITHUB AUTH')
});

await prepare.put(
  'test.txt',
  'No dependencies: ' + new Date()
);

const commit = await prepare.commit('Committing with no dependencies at all');
alert('Committed \n' + JSON.stringify(commit, null, 2));

With Octokit:

const octokit = new Octokit({ auth: prompt('GITHUB AUTH') });
const prepare = await webcommit({
  owner: 'oyin-bo',
  repo: 'webcommit',
  branch: 'test',
  octokit // <-- here
});

await prepare.put(
  'test.txt',
  'Using Octokit: ' + new Date()
);

const commit = await prepare.commit('Using Octokit');

alert('Committed \n' + JSON.stringify(commit, null, 2));
0.1.1

4 months ago

0.1.0

4 months ago