Set and get a GitHub repository description
npm install --save gh-description
or
npm install --global gh-description
const ghDescription = require('gh-description');
ghDescription('RichardLitt/gh-description');
//=> 'Set and get a GitHub repository description'
ghDescription('RichardLitt/gh-description', 'unicorns & rainbows');
//=> 'unicorns & rainbows'
Type: string
The name for the repository to test.
Type: string
The new description to set. To set, you must also supply the repoName first.
Type: bool
or string
Specify a different endpoint for the GitHub URL. Useful for GitHub Enterprise.
Setting this flag as a boolean will automatically pull from the environmental variable GITHUB_ENDPOINT
.
If using enterprise
, the token must be explicitly set and cannot be passed through from the environment. This is to ensure that bad credentials from the public GitHub don't mess up the works.
Alias: e
Your GitHub access token, if not set as an env variable or supplied in the CLI.
The gh-description
command uses ghauth to generate and locally store a GitHub API personal token.
You can skip this step by manually generating a token and setting it as an environment variable named GH_DESCRIPTION_TOKEN
.
$ gh-description --help
Usage
$ gh-description [input]
Options
-e, --enterprise Specify a different GitHub endpoint
Examples
$ gh-description
Set and get a GitHub repository description
$ gh-description RichardLitt/gh-description
Set and get a GitHub repository description
$ gh-description RichardLitt/gh-description 'ponies and unicorns'
New description: ponies and unicorns
$ gh-description RichardLitt/gh-description -e
New enterprise description: Engage
$ gh-description RichardLitt/gh-description -e https://scottymcscottface.co.uk
New enterprise description: Beam Me Up
PRs and issues gladly accepted!
MIT © Richard Littauer