github-upstream-url

Get the upstream URL for your fork.

Usage no npm install needed!

<script type="module">
  import githubUpstreamUrl from 'https://cdn.skypack.dev/github-upstream-url';
</script>

README

github-upstream-url Build Status

Get the upstream URL for your fork.

Install

$ npm install --save github-upstream-url

Usage

const githubUpstreamUrl = require('github-upstream-url');

githubUpstreamUrl('user/repo')
    .then((url) => console.log(url || 'Not a fork!'))
    .catch((err) => console.error(err))

API

githubUpstreamUrl(input)

input

Type: string

user/repo

CLI

Usage: $ github-upstream-url [user/repo]

Examples:

$ github-upstream-url hemanth/node
https://github.com/nodejs/node.git

License

MIT © Hemanth.HM