1.1.0 • Published 5 years ago

githubs-api v1.1.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
5 years ago

About

Manage GitHub repositories in bulk

Install

npm install --save githubs-api

Usage

const {GitHubRepos} = require('githubs-api')

// instantiate using a github token
const githubRepos = new GitHubRepos({
  githubtoken: 'abc'
})

// update repos in bulk based on settings
// specified in requestOptions
await githubRepos.update(requestOptions)

Example

const {GitHubRepos} = require('githubs-api')

// provide a personal developer access token
// obtained from the GitHub Developer Settings
// page at: https://github.com/settings/tokens
const githubRepos = new GitHubRepos({
  githubtoken: 'abc'
})

// this will update all github repositories owned by
// your user (as provided in the token) and set all
// of them to remove the issues tab from the project
// page
const requestOptions = {
  repoFilter: {
    type: 'owner'
  },
  features: {
    issues: 'off'
  }
}

const result = await githubRepos.update(requestOptions)

API

Current API support:

ClassMethods
GitHubReposupdate(repoFilter, features)
getAll(repoFilter, nameFilter)

Contributing

Please consult CONTIRBUTING for guidelines on contributing to this project.

Author

githubs-api © Liran Tal, Released under the Apache-2.0 License.