With this process we are trying to make contributing simple while also maintaining a high level of code quality and clean history. Members of the Decred team must follow the same procedures as external contributors.

Our model for contributing in outline form is as follows. If any of this does not make sense, don’t worry, it will be explained in more detail in the next sections.

Find an issue you want to work on. If there are none describing your issue, open one with what you are going to do.

Make changes on a branch.

Push these changes to your own forked GitHub repo.

When your changes are ready to be reviewed or when you just want input from other devs open a Pull Request (PR) on the main repo from the GitHub web page.

Add a comment on the PR that says what issue you are fixing. Put the text Closes # or Fixes # followed by the number of the issue on a single line. This will allow GitHub to automatically link the PR to the issue and close the issue when the PR is closed.

You can request a specific reviewer from the GitHub webpage or you can ask someone on IRC/Slack to review.

ALL changes must be reviewed and receive at least one approval before they can go in. Only team members can give official approval, but comments from other users are encouraged.

If there are changes requested, make those changes and commit them to your local branch.

Push those changes to the same branch you have been working on. They will show up in the PR that way and the reviewer can then compare to the previous version.

Once your changes are approved, they can be merged into master. To keep history clean, we only allow non-fast-forward merges (that means we want a linear history). Most PRs also must be squashed to a single commit (although if there is reason to have it as multiple commits that can be considered on a case by case basis).

If your PR is a single commit (or can be squashed by GitHub automatically) and is caught up with master, the reviewer will merge your PR. If your branch was too far behind, you may be asked to rebase your commit. Once that is done and pushed, the reviewer will merge your commit.

Each GitHub repo has a LICENSE. Your new code must be under the same LICENSE as the existing code and assigned copyright to ‘The Decred Developers’. In most cases this is the very liberal ISC license but a few repos are different. Check the repo to be sure.

If you have any questions for contributing, feel free to ask on irc/slack or GitHub. Decred team members (and probably community members too) will be happy to help.