Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rjz/hubbub

Consistent configuration for github projects + integrations
https://github.com/rjz/hubbub

Last synced: 6 days ago
JSON representation

Consistent configuration for github projects + integrations

Awesome Lists containing this project

README

        

# Hubbub

[![Build
Status](https://travis-ci.org/rjz/hubbub.svg?branch=master)](https://travis-ci.org/rjz/hubbub)

VCS-configurations-as-code: establish, apply, and maintain transparent policies
for your many source-controlled projects.

Teams and individuals might use it to:

- Manage repository settings
- Check in licenses or contributing guidelines
- Configure webhooks and third-party services
- Configure CI integrations

Repositories hosted on [Github][github] are supported out of the box;
contributions for integrating with other third-party integrations and VCS hosts
[are welcome][contributing]!

## Build

Build hubbub using go >= 1.5 and make:

$ make

## Get started

1. Define a policy
2. Assign it to your repositories

### Define a policy

Policies are JSON documents that describes the desired state of the repository
in terms of sequential goals.

Let's create a policy that adds a 'hello_world.txt' file to subject
repositories:

```json
[
{
"github_file" : {
"state": "present",
"ref": "heads/master",
"name": "hello_world.txt",
"content":"'Hi!' --hubbub"
}
}
]
```

Save it as `./config/policies/hello_world.json`.

### Assign it to your repositories

Next, let's create a list of repos that will be subject to the policy.

```json
[
{ "url": "github.com/rjz/uno" },
{ "url": "github.com/rjz/dos" },
{ "url": "github.com/rjz/tres" }
]
```

Save it as `./config/repos/all.json`.

### Apply the policy

In order to use the Github API, we'll need to [obtain][github-token] a valid
access token and add it to the environment:

$ export HUBBUB_GITHUB_ACCESS_TOKEN=xyz

Finally, we can use `hubbub apply` to add `hello_world.txt` to each of the
subject repos.

$ hubbub apply \
-policy=hello_world \
-repositories=all

### Service Integrations

Check out each [service's README](services/).

## License

MIT

[github]: https://github.com
[github-token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
[contributing]: CONTRIBUTING.md