Commit 31e61e4d authored by Nick Elsmore's avatar Nick Elsmore

Add contribution instructions to README

parent 3008bd7c
......@@ -93,4 +93,26 @@ Coming soon!
## Contributing to PyraOS
Coming soon!
\ No newline at end of file
Please contribute! PyraOS is a community driven project, so we are doing everything we can to make it easy and safe for the community to provide contributions to source code. The PyraOS build system tracks all OS and build system source code in `git` which makes contribution simple. However, there are a few rules set in place to make sure everything stays clean and organized.
### Creating merge requests
In order to maintain a clean and stable working history within the git repositories, contributors are NOT allowed to push directly to protected branches. You can check the remote to see which branches are protected, but typically `master` will always be protected.
Before making changes to the code, first check the remote to see if there is currently a merge request out for the given issue. If there is, great! Just make comments on the given merge request to help the contributor currently working on it. Otherwise, ensure that you first checkout the main development branch. `repo` checks out commits in a detached state, so make sure you are not branching off of the main development branch. If other commits are merged before feature branch is, you must rebase your feature branch on top of the main development branch before it can be merged.
Next, create a feature branch with the following name structure `\<forum-handle\>/\<[feature|fix]\>/\<branch-name\>`. For example, `toastbucket/fix/update-twl6040-register-map`. Make your commits on this branch and push to the remote with the following command. To get the name of the remote, run `git remote -v`. Note that you do not need to perform git operations from within the docker environment.
```
git push -u <remote-name> <branch-name>
```
Once your commit has been pushed, create a merge request on the remote by logging in on a browser and navigating to the repository. Click on `Merge Requests` on the left sidebar. You should see a button at the top for creating a merge request.
### Coding style requirements
One of the main goals of PyraOS/LetuxOS is to push changes back to mainline. This helps maintain support for the Pyra in future kernel revisions. Because of this, coding style of contributions is important in order to prevent rejection during review from mainline maintainers. Please read up on the following coding guidelines before pushing any features or fixes.
Linux coding style: https://www.kernel.org/doc/html/v4.17/process/coding-style.html
U-Boot coding style: https://www.denx.de/wiki/U-Boot/CodingStyle
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment