Thanks for your interest in contributing to OpenHands! We welcome and appreciate contributions.
There are many ways that you can contribute:
To understand the codebase, please refer to the README in each module:
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.
Fork the OpenHands repository into your own account. Clone your own forked repository into your local environment:
git clone git@github.com:<YOUR-USERNAME>/OpenHands.git
Set the official repository as your upstream to synchronize with the latest update in the official repository. Add the original repository as upstream:
cd OpenHands
git remote add upstream git@github.com:All-Hands-AI/OpenHands.git
Verify that the remote is set:
git remote -v
You should see both origin and upstream in the output.
Synchronize latest commit with official repository before coding:
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
We have a separate doc Development.md that tells you how to set up a development workflow.
Once you have done this, you can write code, test it, and commit it to a branch (replace my_branch with an appropriate name):
git checkout -b my_branch
git add .
git commit
git push origin my_branch
Branches... beside your branch and click on New pull requestbase repository to All-Hands-AI/OpenHandsbase to mainCreate pull requestThe PR should appear in OpenHands PRs.
Then the OpenHands team will review your code.
As described here, a valid PR title should begin with one of the following prefixes:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white space, formatting, missing semicolons, etc.)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testsbuild: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)chore: Other changes that don't modify src or test filesrevert: Reverts a previous commitFor example, a PR title could be:
refactor: modify package pathfeat(frontend): xxxx, where (frontend) means that this PR mainly focuses on the frontend component.You may also check out previous PRs in the PR list.