Build Status Software License Release Last Release Github commits (since latest release) Last Commit Code Size Repo Size Contributors WolfSoftware

GHBulk

GHBulk is a GitHub bulk respostiory creator, it works by reading a yaml file which contains the repository information.

Installation

Installing GHBulk is very simple, just execute the following command.

gem install ghbulk

Command line usage

Usage: ghbulk
    -h, --help                       Display this screen
    -f, --filename string            The file where the repository details are stored.
    -t, --token string               The GitHub token to use.

Default filename is repositories.yml

File format

The file should contain valid YAML.

Example File

repos:
  - name: ghbulk
    organization: WolfSoftware
    description: A small gem for bulk creation of GitHub repositories
    has_issues: true
    has_projects: false
    has_wiki: false
    license_template: mit

File options

Name Type Default Description
action string create The action to be performed.
allow_merge_commit boolean true Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
allow_rebase_merge boolean true Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
allow_squash_merge boolean true Either true to allow squash-merging pull requests, or false to prevent squash-merging.
auto_init boolean false Pass true to create an initial commit with empty README.
delete_branch_on_merge boolean false Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion
description string A short description of the repository.
gitignore_template string Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, "Haskell".
has_issues boolean true Either true to enable issues for this repository or false to disable them.
has_projects boolean true Either true to enable projects for this repository or false to disable them. If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
has_wiki boolean true Either true to enable the wiki for this repository or false to disable it.
homepage string A URL with more information about the repository.
is_template boolean false Either true to make this repo available as a template repository or false to prevent it.
license_template string Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, "mit" or "mpl-2.0".
name string The name of the repository.
private boolean false Either true to create a private repository or false to create a public one. Creating private repositories requires a paid GitHub account.
team_id integer The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.

The only 'required' parameter is 'name'.

Contributing to GHBulk

Setup

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Testing

For local testing make sure that you run bundle exec rspec spec and then rake install to install the gem locally.

For further information please refer to the contributing documentation.

To-Do List

  • [ ] Better validation