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

https://github.com/bukinoshita/git-topics

Auto create Github topics for repositories
https://github.com/bukinoshita/git-topics

cli git github repo repository topic topics

Last synced: 2 months ago
JSON representation

Auto create Github topics for repositories

Awesome Lists containing this project

README

        

# git-topics [![Build Status](https://travis-ci.org/bukinoshita/git-topics.svg?branch=master)](https://travis-ci.org/bukinoshita/git-topics)

> Auto create Github topics for repositories

## Install

```bash
$ yarn add git-topics
```

## Usage

```js
const gitTopics = require('git-topics')

const token = 'foo'

gitTopics(token, {
topics: ['github', 'git'],
project: 'bukinoshita/git-topics'
}).then(res => res)
// => "['github', 'git']"
```

## API

### gitTopics(token, [options])

Returns a `promise`

#### token

Type: `string`

Required

[Github access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)

#### options

Type: `object`

##### topics

Type: `array`

Default: It will try to get `keywords` from `package.json`

Array of topics to be added to Github

##### project

Type: `string`

Default: It will try to get `repository` from `package.json`

Github project to add topics

## Related

- [git-topics-cli](https://github.com/bukinoshita/git-topics-cli) — CLI for this module

## License

MIT © [Bu Kinoshita](https://bukinoshita.io)