gobot.io/x/gobot@v1.16.0/CONTRIBUTING.md (about) 1 # Contributing to Gobot 2 3 ## Target Branch 4 **Please open all non-hotfix PRs against the `dev` branch!** 5 6 Gobot follows a ["git flow"](http://nvie.com/posts/a-successful-git-branching-model/)-style model for managing development. 7 8 ## Issue Contributions 9 10 When opening new issues or commenting on existing issues on this repository 11 please make sure discussions are related to concrete technical issues with the 12 Gobot software. 13 14 ## Code Contributions 15 16 The Gobot project welcomes new contributors. 17 18 This document will guide you through the contribution process. 19 20 What do you want to contribute? 21 22 - I want to otherwise correct or improve the docs or examples 23 - I want to report a bug 24 - I want to add some feature or functionality to an existing hardware platform 25 - I want to add support for a new hardware platform 26 27 Descriptions for each of these will eventually be provided below. 28 29 ## General Guidelines 30 31 * All active development is in the `dev` branch. New or updated features must be added to the `dev` branch. Hotfixes will be considered on the `master` branch in situations where it does not alter behaviour or features, only fixes a bug. 32 * All patches must be provided under the Apache 2.0 License 33 * Please use the -S option in git to "sign off" that the commit is your work and you are providing it under the Apache 2.0 License 34 * Submit a Github Pull Request to the appropriate branch and ideally discuss the changes with us in IRC. 35 * We will look at the patch, test it out, and give you feedback. 36 * Avoid doing minor whitespace changes, renamings, etc. along with merged content. These will be done by the maintainers from time to time but they can complicate merges and should be done seperately. 37 * Take care to maintain the existing coding style. 38 * `golint` and `go fmt` your code. 39 * Add unit tests for any new or changed functionality. 40 * All pull requests should be "fast forward" 41 * If there are commits after yours use “git rebase -i <new_head_branch>” 42 * If you have local changes you may need to use “git stash” 43 * For git help see [progit](http://git-scm.com/book) which is an awesome (and free) book on git 44 45 ## Creating Pull Requests 46 Because Gobot makes use of self-referencing import paths, you will want 47 to implement the local copy of your fork as a remote on your copy of the 48 original Gobot repo. Katrina Owen has [an excellent post on this workflow](https://splice.com/blog/contributing-open-source-git-repositories-go/). 49 50 The basics are as follows: 51 52 1. Fork the project via the GitHub UI 53 54 2. `go get` the upstream repo and set it up as the `upstream` remote and your own repo as the `origin` remote: 55 56 `go get gobot.io/x/gobot` 57 `cd $GOPATH/src/gobot.io/x/gobot` 58 `git remote rename origin upstream` 59 `git remote add origin git@github.com/YOUR_GITHUB_NAME/gobot` 60 61 All import paths should now work fine assuming that you've got the 62 proper branch checked out. 63 64 3. Get all the needed gobot's dependencies each of them at their needed version. Gobot uses [dep (Dependency management for Go)](https://golang.github.io/dep/) to manage the project's dependencies. To get all the correct dependencies: 65 66 * Install dep tool. Follow the dep [installation](https://golang.github.io/dep/docs/installation.html) instructions in case you don't have it already installed. 67 * `cd $GOPATH/src/gobot.io/x/gobot` 68 * `dep ensure` will fetch all the dependencies at their needed version. 69 70 ## Landing Pull Requests 71 (This is for committers only. If you are unsure whether you are a committer, you are not.) 72 73 1. Set the contributor's fork as an upstream on your checkout 74 75 `git remote add contrib1 https://github.com/contrib1/gobot` 76 77 2. Fetch the contributor's repo 78 79 `git fetch contrib1` 80 81 3. Checkout a copy of the PR branch 82 83 `git checkout pr-1234 --track contrib1/branch-for-pr-1234` 84 85 4. Review the PR as normal 86 87 5. Land when you're ready via the GitHub UI 88 89 ## Developer's Certificate of Origin 1.0 90 91 By making a contribution to this project, I certify that: 92 93 * (a) The contribution was created in whole or in part by me and I 94 have the right to submit it under the open source license indicated 95 in the file; or 96 * (b) The contribution is based upon previous work that, to the best 97 of my knowledge, is covered under an appropriate open source license 98 and I have the right under that license to submit that work with 99 modifications, whether created in whole or in part by me, under the 100 same open source license (unless I am permitted to submit under a 101 different license), as indicated in the file; or 102 * (c) The contribution was provided directly to me by some other 103 person who certified (a), (b) or (c) and I have not modified it. 104 105 ## Code of Conduct 106 107 Gobot is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. [You can read about it here](CODE_OF_CONDUCT.md). 108 109 ## Origins 110 111 This document is based on the original [io.js contribution guidelines](https://github.com/nodejs/io.js/blob/master/CONTRIBUTING.md)