Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 2.46 KB

DEVELOPMENT.md

File metadata and controls

70 lines (48 loc) · 2.46 KB

Development

This doc explains the development workflow so you can get started contributing to Grafeas!

Getting started

First, you will need to setup your GitHub account and create a fork:

  1. Create a GitHub account
  2. Setup GitHub access via SSH
  3. Create and checkout a repo fork

Once you have those, you can iterate on Grafeas:

  1. Run your instance of Grafeas
  2. Run Grafeas tests

When you're ready, you can create a PR!

Checkout your fork

The Go tools require that you clone the repository to the src/github.com/grafeas/grafeas directory in your GOPATH.

To check out this repository:

  1. Create your own fork of this repo
  2. Clone it to your machine:
mkdir -p ${GOPATH}/src/github.com/grafeas
cd ${GOPATH}/src/github.com/grafeas
git clone git@github.com:${YOUR_GITHUB_USERNAME}/grafeas.git
cd grafeas
git remote add upstream git@github.com:grafeas/grafeas.git
git remote set-url --push upstream no_push

Adding the upstream remote sets you up nicely for regularly syncing your fork.

Testing Grafeas

Grafeas has unit tests, which can be run with:

make test

⚠️ These tests will not run correctly unless you have checked out your fork into your $GOPATH. :warning: Ensure that $GOPATH/bin is on your system $PATH. :warning: These test require either a running Postgres instance (with appropriate credentials) or having the Postgres bin directory on your system PATH.

Creating a PR

When you have changes you would like to propose to Grafeas, you will need to:

  1. Ensure the commit message(s) describe what issue you are fixing and how you are fixing it (include references to issue numbers if appropriate)
  2. Create a pull request

Reviews

Each PR must be reviewed by a maintainer. You may be asked to meet with a member of the core Grafeas team to discuss the PR at high level, before they start the detailed review.