1.1.0 • Published 3 years ago

@bevry/github-commit v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Fetch the latest commit of a GitHub repository

Usage

Complete API Documentation.

// import the library
import getCommit from '@bevry/github-commit`

// fetch the commit
const commit = await getCommit('bevry/github-commit').catch((err) => {
    // if something went wrong, such as unauthorized, empty repository, no internet connection
    // then log the error as a warning
    console.warn(err)

    // and fallback to master
    return 'master'
})

// log the eventual result
console.log(commit)

npm

Skypack

<script type="module">
    import pkg from '//cdn.skypack.dev/@bevry/github-commit@^1.1.0'
</script>

unpkg

<script type="module">
    import pkg from '//unpkg.com/@bevry/github-commit@^1.1.0'
</script>

jspm

<script type="module">
    import pkg from '//dev.jspm.io/@bevry/github-commit@1.1.0'
</script>

Discover the release history by heading on over to the HISTORY.md file.

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

These amazing people are maintaining this project:

No sponsors yet! Will you be the first?

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Unless stated otherwise all works are:

and licensed under: