Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/knutkirkhorn/gh-latest-commit

:octocat: Get a users latest GitHub commit
https://github.com/knutkirkhorn/gh-latest-commit

commit gh github latest

Last synced: 30 days ago
JSON representation

:octocat: Get a users latest GitHub commit

Awesome Lists containing this project

README

        

# gh-latest-commit

> :octocat: Get a users latest GitHub commit

## Installation

```
npm install gh-latest-commit
```

## Usage

```js
import ghLatestCommit from 'gh-latest-commit';

console.log(await ghLatestCommit('knutkirkhorn'));
// => { message: ..., url: ..., time: ... }

// Check if the commit is authored with the given email
console.log(await ghLatestCommit('knutkirkhorn', '[email protected]'));
// => { message: ..., url: ..., time: ... }
```

## API

### ghLatestCommit(username, [email])

Returns the usernames latest GitHub commit. The author email of the commit needs to match if the email is set.