Skip to content

Commit

Permalink
Add CONTRIBUTING.md (ava-labs#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-kim authored Apr 18, 2023
1 parent 9677ab7 commit b9d8508
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# How to Contribute to Avalanche

## Setup

To start developing on AvalancheGo, you'll need a few things installed.

- Golang version >= 1.19.6
- gcc
- g++

## Issues

### Security

- Do not open up a GitHub issue if it relates to a security vulnerability in AvalancheGo, and instead refer to our [security policy](./SECURITY.md).

### Did you fix whitespace, format code, or make a purely cosmetic patch?

- Changes from the community that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of `avalanchego` will generally not be accepted.

### Making an Issue

- Check that the issue you're filing doesn't already exist by searching under [issues](https://github.com/ava-labs/avalanchego/issues).
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/ava-labs/avalanchego/issues/new/choose). Be sure to include a *title and clear description* with as much relevant information as possible.

## Features

- If you want to start a discussion about the development of a new feature or the modfiication of an existing one, start a thread under GitHub [discussions](https://github.com/ava-labs/avalanchego/discussions/categories/ideas).
- Post a thread about your idea and why it should be added to AvalancheGo.
- Don't start working on a pull request until you've received positive feedback from the maintainers.

## Pull Request Guidelines

- Open a new GitHub pull request containing your changes.
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
- The PR should be opened against the `dev` branch.
- If your PR isn't ready to be reviewed just yet, you can open it as a draft to collect early feedback on your changes.
- Once the PR is ready for review, mark it as ready-for-review and request review from one of the maintainers.

### Autogenerated code

- Any changes to protobuf message types require that protobuf files are regenerated.

```sh
./scripts/protobuf_codegen.sh
```

- To add or remove an interface that needs a corresponding mock generated, add it to the mock file [here](./scripts/mocks.mockgen.txt). You can regenerate the mocks by running the following script.

```sh
./scripts/mock.gen.sh
```

### Testing

#### Local

- Build the avalanchego binary

```sh
./scripts/build.sh
```

- Run unit tests

```sh
./scripts/build_test.sh
```

- Run the linter

```sh
./scripts/lint.sh
```

### Continuous Integration (CI)

- Pull requests will generally not be approved or merged unless they pass CI.

## Other

### Do you have questions about the source code?

- Ask any question about AvalancheGo under GitHub [discussions](https://github.com/ava-labs/avalanchego/discussions/categories/q-a).

### Do you want to contribute to the Avalanche documentation?

- Please check out the `avalanche-docs` repository [here](https://github.com/ava-labs/avalanche-docs).

0 comments on commit b9d8508

Please sign in to comment.