Skip to content

Latest commit

 

History

History
94 lines (62 loc) · 3.64 KB

CONTRIBUTING.md

File metadata and controls

94 lines (62 loc) · 3.64 KB

Contributing to pkg.go.dev

Pkg.go.dev is part of the Go open source project. We would love to receive your contributions!

Since we are actively working on the site, we ask that you file an issue and claim it before starting to work on something. Otherwise, it is likely that we might already be working on a fix for your issue.

Because we are currently working on design updates to pkg.go.dev, we will not be accepting any contributions for issues with a UX label.

Finding issues

All issues related to x/pkgsite are labeled with the pkgsite label.

In particular, we would love your help on issues tagged with the help wanted label.

If this is your first time contributing to x/pkgsite, take a look at the Suggested issues for a good first issue.

Before you begin working on an issue, please leave a comment that you are claiming it.

Getting started

We accept contributions through Gerrit or GitHub PRs. To get started:

  1. Complete the steps in the Go Contribution Guide.

  2. Download the source code for x/pkgsite: git clone https://go.googlesource.com/pkgsite NOTE: You will need Go 1.18 (as of this writing, the beta2 release) to develop pkgsite.

  3. Review the design document.

  4. If you are contributing a CSS change, please review the Go CSS Coding Guidelines.

Running pkg.go.dev locally

There are two ways to run pkg.go.dev locally.

  1. Use a proxy service as a datasource.

  2. Use postgres as the datasource.

See doc/frontend.md for details.

Changing the log level

You can use the GO_DISCOVERY_LOG_LEVEL environment variable to set the log level. All logs below the level that is set will not be printed.

For example, setting GO_DISCOVERY_LOG_LEVEL=info will not print Debug logs, but it will print Info, Error and Fatal logs.

The supported levels are Debug, Info, Error and Fatal.

By default, logs for all levels will be printed.

Before sending a CL for review

  1. Run ./all.bash and fix all resulting errors. See doc/precommit.md for instructions on setting up a pre-commit hook.
  2. Ensure your commit message is formatted according to Go conventions.

Tips for Code Review

After addressing code review comments, mark each comment as:

  • "Done" if you did it exactly as described
  • "Done" with a reply if you did it, but with a variation
  • "Ack" if either it wasn't a request for action, or it wasn't necessary to take the action
  • A reply to continue the discussion.

If a CL is in progress, but you want to push the intermediate state, it is helpful to mark the CL as “work in progress”. You can do this using the three-dot menu at top right corner, and clicking Mark as work in progress. Please do this to indicate to the reviewer(s) that a CL isn’t ready for review.

Questions

If you are interested in contributing and have questions, come talk to us in the #pkgsite channel on the Gophers Slack!