...

Text file src/go.uber.org/zap/CONTRIBUTING.md

Documentation: go.uber.org/zap

     1# Contributing
     2
     3We'd love your help making zap the very best structured logging library in Go!
     4
     5If you'd like to add new exported APIs, please [open an issue][open-issue]
     6describing your proposal — discussing API changes ahead of time makes
     7pull request review much smoother. In your issue, pull request, and any other
     8communications, please remember to treat your fellow contributors with
     9respect! We take our [code of conduct](CODE_OF_CONDUCT.md) seriously.
    10
    11Note that you'll need to sign [Uber's Contributor License Agreement][cla]
    12before we can accept any of your contributions. If necessary, a bot will remind
    13you to accept the CLA when you open your pull request.
    14
    15## Setup
    16
    17[Fork][fork], then clone the repository:
    18
    19```bash
    20mkdir -p $GOPATH/src/go.uber.org
    21cd $GOPATH/src/go.uber.org
    22git clone git@github.com:your_github_username/zap.git
    23cd zap
    24git remote add upstream https://github.com/uber-go/zap.git
    25git fetch upstream
    26```
    27
    28Make sure that the tests and the linters pass:
    29
    30```bash
    31make test
    32make lint
    33```
    34
    35## Making Changes
    36
    37Start by creating a new branch for your changes:
    38
    39```bash
    40cd $GOPATH/src/go.uber.org/zap
    41git checkout master
    42git fetch upstream
    43git rebase upstream/master
    44git checkout -b cool_new_feature
    45```
    46
    47Make your changes, then ensure that `make lint` and `make test` still pass. If
    48you're satisfied with your changes, push them to your fork.
    49
    50```bash
    51git push origin cool_new_feature
    52```
    53
    54Then use the GitHub UI to open a pull request.
    55
    56At this point, you're waiting on us to review your changes. We _try_ to respond
    57to issues and pull requests within a few business days, and we may suggest some
    58improvements or alternatives. Once your changes are approved, one of the
    59project maintainers will merge them.
    60
    61We're much more likely to approve your changes if you:
    62
    63- Add tests for new functionality.
    64- Write a [good commit message][commit-message].
    65- Maintain backward compatibility.
    66
    67[fork]: https://github.com/uber-go/zap/fork
    68[open-issue]: https://github.com/uber-go/zap/issues/new
    69[cla]: https://cla-assistant.io/uber-go/zap
    70[commit-message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

View as plain text