ghsync

command module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2017 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ghsync

Build Status Go Report Card Code Climate

ghsync is a CLI tool that allows you to sync configuration specified in a configuration file to multiple GitHub repositories. This is particularly useful when you work with many repositories in your organization that should all follow certain standard configurations.

Example Usage

$ cat ghrepos.yaml
labels:
  foo: '#ffffff'
  bar: '#000000'
  
milestones:
  - title: Version 0.1
    description: All issues that need to be done before release 0.1
    due: 2017-02-06T12:00:00Z
    state: closed
  - title: Version 1.0
    description: All issues that need to be done before release 1.0
    due: 2017-03-02T12:00:00Z
    state: open
  - title: Version 1.1
    description: All issues that need to be done before release 1.1
    due: 2017-03-03T12:00:00Z
    state: open
$ echo seiffert/ghsync | ghsync --config ghsync.yaml
Syncing Labels
Processing repository "seiffert/ghsync"
  Found 7 labels
  Creating label "foo": "ffffff"
  Creating label "bar": "000000"
  
Syncing Milestones
Processing repository "seiffert/ghsync"
  Found 1 milestones
  Creating milestone "Version 1.0"
  Creating milestone "Version 1.1"

To authenticate against the GitHub API, ghsync requires a GitHub access token. Generate a token one in your account settings and pass it either as environment variable GITHUB_TOKEN or via the --token option:

$ echo seiffert/ghsync | ghsync --token <GITHUB_TOKEN> --config ghsync.yaml

Instead of echoing the repositories manually, you can use my tool ghrepos to get a list of repositories with a specific topic:

$ ghrepos -o seiffert github | ghsync --config ghsync.yaml
Processing repository "seiffert/ghrepos"
  Found 7 labels
  Creating label "bar": "000000"
  Creating label "foo": "ffffff"
Processing repository "seiffert/ghsync"
  Found 9 labels
  Label "foo": "ffffff" already exists
  Label "bar": "000000" already exists

Installation

To install ghsync, download a binary from the provided GitHub releases and put it into a folder that is part of your system's $PATH.

Contribution

If you have ideas for improving this little tools or just a question, please don't hesitate to open an issue or even fork this repository and create a pull-request!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL