Set and get a GitHub repository topics
NOTE: GitHub's API does not yet adequately return the topics
tag. As such, this code will not work, at all. See the note here.
If you think this is not true, ping me immediately by opening an issue. I will make this work.
npm install --save gh-topics
or
npm install --global gh-topics
const ghTopics = require('gh-topics');
ghTopics('RichardLitt/gh-topics');
//=> 'Set and get a GitHub repository topics'
ghTopics('RichardLitt/gh-topics', 'unicorns & rainbows');
//=> 'unicorns & rainbows'
Type: string
The name for the repository to test.
Type: string
The new topics to set. To set, you must also supply the repoName first.
None.
Your GitHub access token, if not set as an env variable or supplied in the CLI.
The gh-topics
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 variabled named GH_DESCRIPTION_TOKEN
.
$ gh-topics --help
Usage
$ gh-topics
Examples
$ gh-topics
Current topics: Set and get a GitHub repository topics
$ gh-topics RichardLitt/gh-topics 'ponies and unicorns'
New topics: ponies and unicorns
PRs and issues gladly accepted!
MIT © Richard Littauer