Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Latest commit

 

History

History
76 lines (52 loc) · 2.52 KB

CONTRIBUTING.md

File metadata and controls

76 lines (52 loc) · 2.52 KB

How to Contribute

We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.

Setup

If you haven't written Go code on your machine before, first follow the official Golang instructions for setting up your environment: https://golang.org/doc/code.html

Once you have your environment set up, create a fork of the container-diff repository with your personal GitHub account. Then, clone the fork into your $GOPATH:

git clone [email protected]:<your_account>/container-diff.git 
$GOPATH/src/github.com/GoogleContainerTools/container-diff &&
cd $GOPATH/src/github.com/GoogleContainerTools/container-diff &&
git remote add upstream [email protected]:GoogleContainerTools/container-diff.git

The last command here sets the official repository as an upstream repository for your fork, so you can keep your fork in sync with MASTER:

(container-diff) git pull upstream master && git push origin master

Building

From the project root, run make clean && make.

Code reviews

All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.

Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution, this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.

Tests

Before sending a PR, please make sure the included tests pass. You can run these by running

make test integration

from the project root.

You can also configure the included git hook to run tests automatically on commit. To do so, run:

ln -s $(pwd)/hack/hooks/* .git/hooks

from the project root.

Dependencies

This project uses dep for managing dependencies and the vendor directory. You should not need to know about this tool unless you are trying to add a new dependency or update an existing one.

See the dep documentation for information on how to add a dependency.