Skip to content

Contributor guide

Amy Buck edited this page Dec 10, 2018 · 40 revisions

You've decided to contribute to the OpenSwitch project. This information describes how to open your first review.

Important: The OpenSwitch project enforces commit signoffs. Sign your commits with git commit --signoff.

Walkthrough

git clone https://github.com/open-switch/opx-logging && cd opx-logging
git checkout --track origin/master -b bugfix/overflow

# work work work
git commit -s
git pull-request

# receive comments and fix
git commit -s
git pull-request

Get personal access token

You need to generate a personal access token to open pull requests from the command line (see new personal token to create one). Select only the repo scope and provide the token description, then add an entry to your ~/.netrc file replacing <username> and <token>.

machine github.com login <username> password <token>

Open first pull request

Prerequisite: git-pull-request

pip3 install git-pull-request

After cloning the code:

  1. Enter the repo you would like to work on.
  2. Check out a branch which tracks origin/master.
  3. Commit your changes with git commit -s.
  4. Run git pull-request to fork and submit a pull request.

Update review details

  • Create a new commit if someone suggests changes (reviewers can see the difference between updates)
  • When you run git pull-request again, your existing review is updated with the new changes

Review checks

Status checks must pass for a review to be merged. Here are a few status checks:

  • Code-Review — A maintainer of the repository must approve your changes
  • CI Build — Your change must successfully build
  • DCO Signoff — You must sign all commits

Finish review

Use the Squash and merge option to finish the review to keep the history linear and commits atomic.

Clone this wiki locally