The HydraDX
project is an Open Source Project if you'd like to help us please follow these rules so that our lives are easy
- Code of Conduct
- Question or Problem?
- Issues and Bugs
- Feature Requests
- Submission Guidelines
- Coding Rules
- Pull Request Naming Guidelines
- SemVer
Help us keep HydraDX open and inclusive. Please read and follow our coc.
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on Discord.
If you find a bug in the source code, you can help us by submitting an issue to our repository. Even better, you can submit a PR with a fix.
You can request a new feature by submitting an issue to our GitHub Repository. If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
- For a Major Feature, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
- Small Features can be crafted and directly submitted as a Pull Request.
Before you submit an Issue, please search Issues for an open or closed Issue in this repository. Please use the provided templates to create new issues.
Before you submit your Pull Request (PR) consider the following guidelines:
-
Search GitHub for an open or closed PR that relates to your submission. You don't want to duplicate effort.
-
Please sign our Contributor License Agreement (CLA) before sending PRs. We cannot accept code without this. Make sure you sign with the primary email address.
-
Fork the repository.
-
Make your changes in a new git branch:
git checkout -b fix/my-branch master
-
Create your patch, including appropriate test cases.
-
Follow our Coding Rules.
-
Run the respective test suites and make sure it passes.
-
Use respective formatting tools to format the code.
-
Commit your changes using a descriptive commit message.
git commit -a
Note: the optional commit
-a
command line option will automatically "add" and "rm" edited files. -
Push your branch to GitHub:
git push origin fix/my-branch
-
In GitHub, send a pull request to
master
ormain
branch. -
Make sure the PR name follows conventional commit format
-
Make sure you bumped the correct versions. We're following SemVer
- If we suggest changes then:
- Make the required updates.
- Re-run the test suites to ensure tests are still passing.
That's it! Thank you for your contribution!
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
-
Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete fix/my-branch
-
Check out the master branch:
git checkout master -f
-
Delete the local branch:
git branch -D fix/my-branch
-
Update your master with the latest upstream version:
git pull --ff upstream master
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit.
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more specs unit tests.
- All module API methods must be documented.
- Please follow our style guide
We have very precise rules over how our git pull request names can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git merge commit messages to generate the change logs.
Each pull-request name consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>)<breaking-change-indicator>: <subject>
Samples:
ci(changelog): generate changelog
fix(amm): fix benchmarking
feat(claim)!: add possibility to change claim data
- Note that last message indicates a breaking change
Must be one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: cargo, substrate)
- ci: Changes to our CI configuration files and scripts (example scopes: gh-actions, bench-bot)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix (example scopes: amm, claims)
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests (example scopes: amm, claims)
The scope should be the name of the affected module (as perceived by the person reading the changelog generated from merge commit messages). If the PR touches more than one thing, leave it blank and try to use subject to describe the change.
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
Breaking Changes add ! after the scope
We're following SemVer specification to keep us and our dependencies sane.
- please bump respective version of the closest package file (cargo.toml or package.json).
- if the change is a breaking change, always change the MAJOR version and bump version of packages above the package it's using. Follow this guideline to the root of the repository.
- if in the Node repository, bump impl_version (non-breaking change) and spec_version (breaking-change) in the
runtime/lib.rs
respectively.
Feedback for this guide is welcome! If you believe you have something valuable to add or change, please open a PR.
These contributing guidelines are modified from the Angular guidelines.