1.0.1 • Published 7 years ago

last-successful-gh-commit v1.0.1

Weekly downloads
25
License
MIT
Repository
github
Last release
7 years ago

Node.js v6.5 or newer is required.

Via the yarn client:

$ yarn add --dev last-successful-gh-commit

Via the npm client:

$ npm install --save-dev last-successful-gh-commit
import getLastSuccessfulGHCommit from 'last-successful-gh-commit';

const owner = 'ramasilveyra';
const name = 'last-successful-gh-commit';
const token = process.env.GH_TOKEN;

getLastSuccessfulGHCommit({ owner, name, token })
  .then(commit => {
    console.log('Last successful commit: ', commit);
  })
  .catch(err => {
    console.error('No successful commit found', err);
  });

getLastSuccessfulGHCommit(options)

options

Type: Object Required

options.owner

Type: string Required

Owner of the repository.

options.name

Type: string Required

Name of the repository.

options.token

Type: string Required

GitHub token with repo scope.

Feel free to dive in! Open an issue or submit PRs.

last-successful-gh-commit follows the Contributor Covenant Code of Conduct.

MIT

1.0.1

7 years ago

1.0.0

7 years ago