Skip to content

Commit

Permalink
docs: outsourced contribution rules
Browse files Browse the repository at this point in the history
  • Loading branch information
philippmoehler0440 committed Feb 11, 2018
1 parent ebb881e commit cbfd089
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 28 deletions.
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

## Contribute

Read this file and feel free :-)

### Dockerized

With docker, you do not need to install `go` and `mongodb` on your local machine, it's easy to setup a development environment for this repository. Thanks to @centsent who helped to dockerize this project.

### Prerequisites

Make sure you already installed below programs on your local machine:

* `git`
* `docker`
* `docker-compose`

### dep

[dep](https://github.com/golang/dep) is a prototype dependency management tool for Go.
To use `dep` in the container, prefix `make` for all `dep` commands, for example:

```bash
$ make dep "ensure -add github.com/some/repos"
```

Beware that the double quotes are required after `make dep` command.

### Making Changes

Puppet has some good and simple [contribution rules](https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md#making-changes) so lets adopt them in an adjusted way.

* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* To quickly create a topic branch based on master, run `git checkout -b
fix/master/my_contribution master`. Please avoid working directly on the
`master` branch.
* Make commits of logical and atomic units.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in a proper format:
```
chore: add Oyster build script
docs: explain hat wobble
feat: add beta sequence
fix: remove broken confirmation message
refactor: share logic between 4d3d3d3 and flarhgunnstow
style: convert tabs to spaces
test: ensure Tayne retains clothing
```
[(Source)](https://gist.githubusercontent.com/mutewinter/9648651/raw/77f8abd031d02f822543992a86bf4c1fc50ad760/commit_format_examples.txt)
* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests with `make test` to assure nothing else was accidentally broken (it will build the docker container and run `go test`)
29 changes: 1 addition & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,34 +529,7 @@ If you want to use your own regular expression as attribute tags then use the fo

## Contribute

Feel free! Start pull requests or issues if anything is missing for you :)

### Dockerized

With docker, you do not need to install `go` and `mongodb` on your local machine, it's easy to setup a development environment for this repository. Thanks to @centsent who helped to dockerize this project.

### Prerequisites

Make sure you already installed below programs on your local machine:

* `git`
* `docker`
* `docker-compose`

### Usage

Just run `make test`, it will build the docker container and run `go test`.

### dep

[dep](https://github.com/golang/dep) is a prototype dependency management tool for Go.
To use `dep` in the container, prefix `make` for all `dep` commands, for example:

```bash
$ make dep "ensure -add github.com/some/repos"
```

Beware that the double quotes are required after `make dep` command.
See [CONTRIBUTING.md](CONTRIBUTING.md)

## Questions?

Expand Down

0 comments on commit cbfd089

Please sign in to comment.