👍🎉 First off, thank you for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing. These are just guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
- What Should I Know Before I Get Started?
- How Can I Contribute?
- Set up your dev environment
- Your First Code Contribution
- Releasing (Maintainers only)%
If you're new to GitHub and working with open source repositories, this section will be helpful. Otherwise, you can skip to learning how to set up your dev environment
This project adheres to the Contributor Covenant. By participating, you are expected to uphold this code.
Please report unacceptable behavior to one of the Code Owners.
The below workflow is designed to help you begin your first contribution journey. It will guide you through creating and picking up issues, working through them, having your work reviewed, and then merging.
Help on inner source projects is always welcome and there is always something that can be improved. For example, documentation (like the text you are reading now) can always use improvement, code can always be clarified, variables or functions can always be renamed or commented on, and there is always a need for more test coverage. If you see something that you think should be fixed, take ownership! Here is how you get started:
When contributing, it's useful to start by looking at issues. After picking up an issue, writing code, or updating a document, make a pull request and your work will be reviewed and merged. If you're adding a new feature, it's best to write an issue first to discuss it with maintainers first.
This section guides you through submitting a bug report. Following these guidelines helps maintainers and the community understand your report ✏️, reproduce the behavior 💻, and find related reports 🔎.
Bugs are tracked as GitHub issues using the Bug Report template. Create an issue on that and provide the information suggested in the bug report issue template.
This section guides you through submitting an enhancement suggestion, including completely new features, tools, and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion ✏️ and find related suggestions 🔎
Enhancement suggestions are tracked as GitHub issues using the Feature Request template. Create an issue and provide the information suggested in the feature requests or user story issue template.
Improvements to existing functionality are tracked as GitHub issues using the User Story template. Create an issue and provide the information suggested in the feature requests or user story issue template.
When proposing support for a new language, please submit a GitHub issue using the New Language Proposal template.
Each language-specific implementation has its own dockerized development environment. You can launch the dev environment by running ci/develop.sh
:
cd src/<lang>
./ci/develop.sh
For each language, this will mount the src/<lang>
directory to /src
in a running docker container that has all of the necessary dependencies available. From there, each implementation has its own language-specific development flow.
# Run unit tests
./ci/run-tests.sh
# Compile typescript
npm run build
# Run unit tests
npm run test
# Build the code
go build ./...
# Run unit tests
go test -coverprofile coverage.html ./...
# For the first time build, make the build directory, otherwise skip this
mkdir build
# Configure the build pointing at the mounted /src directory. This may take a
# few minutes the first time to pull down dependencies
cd build
cmake /src
# Build the dependencies and library code
make -j$(nproc)
# Run the unit tests
make test
Unsure where to begin contributing? You can start by looking through these issues:
- Issues with the
good first issue
label - these should only require a few lines of code and are good targets if you're just starting contributing. - Issues with the
help wanted
label - these range from simple to more complex, but are generally things we want but can't get to in a short time frame.
To contribute to this repo, you'll use the Fork and Pull model common in many open source repositories. For details on this process, watch how to contribute.
When ready, you can create a pull request. Pull requests are often referred to as "PR". In general, we follow the standard github pull request process. Follow the template to provide details about your pull request to the maintainers.
Before sending pull requests, make sure your changes pass tests.
Once you've created a pull request, maintainers will review your code and likely make suggestions to fix before merging. It will be easier for your pull request to receive reviews if you consider the criteria the reviewers follow while working. Remember to:
- Run tests locally and ensure they pass
- Follow the project coding conventions
- Write detailed commit messages
- Break large changes into a logical series of smaller patches, which are easy to understand individually and combine to solve a broader issue
The responsibility for releasing new versions of the libraries falls to the maintainers. For details on the process, see the ADR.