Update CONTRIBUTING.md (#2525)

This PR tries to update contributing.md to add a little more structure and make it clear the different ways to contribute.
This commit is contained in:
Graham Neubig 2024-06-19 09:41:48 -06:00 committed by GitHub
parent 64fe3d4cba
commit 8ee5cbc786
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,29 @@
# Contributing
Thanks for your interest in contributing to OpenDevin! We welcome and appreciate contributions.
If you are only looking to setup a development workflow, check out [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md).
## Contribution Guide
Thanks for your interest in contributing to OpenDevin! We welcome and appreciate contributions.
## How Can I Contribute?
There are many ways that you can contribute:
1. **Download and use** OpenDevin, and send [issues](https://github.com/OpenDevin/OpenDevin/issues) when you encounter something that isn't working or a feature that you'd like to see.
2. **Send feedback** after each session by [clicking the thumbs-up thumbs-down buttons](https://opendevin.github.io/OpenDevin/modules/usage/feedback), so we can see where things are working and failing, and also build an open dataset for training code agents.
3. **Improve the Codebase** by sending PRs (see details below). In particular, we have some [good first issue](https://github.com/OpenDevin/OpenDevin/labels/good%20first%20issue) issues that may be ones to start on.
## Understanding OpenDevin's CodeBase
In order to understand the codebase, please refer to the README in each module:
- [frontend](./frontend/README.md)
- [agenthub](./agenthub/README.md)
- [evaluation](./evaluation/README.md)
- [opendevin](./opendevin/README.md)
- [server](./opendevin/server/README.md)
When you write code, it is also good to write tests. Please navigate to the `tests` folder to see existing test suites.
At the moment, we have two kinds of tests: `unit` and `integration`. Please refer to the README for each test suite. These tests also run on github's continuous integration to ensure quality of the project.
## Sending Pull Requests to OpenDevin
### 1. Fork the Official Repository
Fork the [OpenDevin repository](https://github.com/OpenDevin/OpenDevin) into your own account.
Clone your own forked repository into your local environment:
@ -12,6 +33,7 @@ git clone git@github.com:<YOUR-USERNAME>/OpenDevin.git
```
### 2. Configure Git
Set the official repository as your [upstream](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) to synchronize with the latest update in the official repository.
Add the original repository as upstream:
@ -38,10 +60,24 @@ git merge upstream/main
git push origin main
```
### 4. Create a New Branch And Open a Pull Request
1. Create a new branch with your changes
2. On Github, go to the page of your forked repository
3. Create a Pull Request
### 4. Set up the Development Environment
We have a separate doc [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) that tells you how to set up a development workflow.
### 5. Write Code and Commit It
Once you have done this, you can write code, test it, and commit it to a branch (replace `my_branch` with an appropriate name):
```shell
git checkout -b my_branch
git add .
git commit
git push origin my_branch
```
### 6. Open a Pull Request
On Github, go to the page of your forked repository, and create a Pull Request
- Click on `Branches`
- Click on the `...` beside your branch and click on `New pull request`
- Set `base repository` to `OpenDevin/OpenDevin`
@ -53,6 +89,7 @@ The PR should appear in [OpenDevin PRs](https://github.com/OpenDevin/OpenDevin/p
Then the OpenDevin team will review your code.
## PR Rules
### 1. Pull Request title
As described [here](https://github.com/commitizen/conventional-commit-types/blob/master/index.json), a valid PR title should begin with one of the following prefixes:
@ -80,15 +117,3 @@ As described [here](https://github.com/OpenDevin/OpenDevin/labels), we have crea
- If your PR is small (such as a typo fix), you can go brief.
- If it contains a lot of changes, it's better to write more details.
## How to Begin
Please refer to the README in each module:
- [frontend](./frontend/README.md)
- [agenthub](./agenthub/README.md)
- [evaluation](./evaluation/README.md)
- [opendevin](./opendevin/README.md)
- [server](./opendevin/server/README.md)
## Tests
Please navigate to the `tests` folder to see existing test suites.
At the moment, we have two kinds of tests: `unit` and `integration`. Please refer to the README for each test suite. These tests also run on CI to ensure quality of
the project.