|
| 1 | +Contributing to Save Queue |
| 2 | +========================== |
| 3 | +Save Queue is an open source project. Anyone can use the code, but more importantly, anyone can contribute. This is a |
| 4 | + group effort and we value your input. Please consider making a contribution to help improve the Save Queue. This |
| 5 | + guide covers: |
| 6 | + |
| 7 | +* How to file a ticket when you discover a bug |
| 8 | +* How to contribute fixes and improvements to the core |
| 9 | +* Information on how to improve the documentation |
| 10 | + |
| 11 | +1. Who can Contribute? |
| 12 | +---------------------- |
| 13 | +Save Queue is an open source project and as such contributions are always welcome. Our community is one which |
| 14 | + encourages involvement from all developers regardless of their ability level. We ask that you be patient with the |
| 15 | + other members of the community and maintain a respectful attitude towards other people’s work. Open source is a |
| 16 | + great way to learn a new technology so don’t be afraid to jump right in, even if you are new to Ruby/Rails. |
| 17 | + |
| 18 | +2. Before you Contribute |
| 19 | +------------------------ |
| 20 | +Open source projects tend to be a collaborative effort. Since many people are relying upon Save Queue for their real |
| 21 | + world applications, changes to the code can have major implications. Before you write a bug fix or code a new |
| 22 | + feature, you should find out if anybody is interested in your proposed change. You may find that the thing you’re |
| 23 | + trying to “fix” is actually desired behavior. You might also discover that someone else is working on it. Either |
| 24 | + way you can save yourself valuable time by announcing your intentions before starting work. |
| 25 | + |
| 26 | +### 2.1. Notification via Ticket |
| 27 | + |
| 28 | +You can also search existing bug reports/issues and file a new one if you do not find an issue relevant to your |
| 29 | + proposed change. See Filing an Issue for more details. |
| 30 | + |
| 31 | +The important thing is that you communicate your intention in advance of doing a lot of work. Simple bug fixes and |
| 32 | + non-controversial changes do not require this approach but you can save some time by suggesting an improvement and |
| 33 | + having it rejected before you write a bunch of the code. |
| 34 | + |
| 35 | +3. Filing an Issue |
| 36 | +----------------- |
| 37 | +If you would like to file a bug report, please create an issue in our Github Issues Tracker. You should do a basic |
| 38 | + search of the issues database before creating a new issue to ensure that you are not creating a duplicate issue. |
| 39 | + |
| 40 | +Please do not assign labels or create new labels to your issue. We will assign the appropriate labels to ensure your |
| 41 | + ticket is handled in the appropriate manner. |
| 42 | + |
| 43 | +### 3.1. Providing a Patch |
| 44 | + |
| 45 | +If you are filing and issue and supplying a patch at the same time, please file a Pull Request instead. The pull |
| 46 | + request will also create an issue at the same time but its superior to just creating an issue because the code and |
| 47 | + issue can be linked. |
| 48 | + |
| 49 | +If the ticket already exists, however, and you want to supply a patch after the fact, |
| 50 | + you can simply reference the issue number in your commit message. For example, if your commit fixed issue #123 you |
| 51 | + could use the following commit message: |
| 52 | + |
| 53 | + Fixed a problem with Facebook authentication. |
| 54 | + |
| 55 | + [Fixes #123] |
| 56 | +Github will automatically detect this commit message when you push it and link the issue. Please see the detailed |
| 57 | + Github Issues blog post for more details. |
| 58 | + |
| 59 | +### 3.2. Feature Requests |
| 60 | + |
| 61 | +We’re interested in hearing your ideas for new features but creating feature requests in the Issue Tracker is not |
| 62 | + the proper way to ask for a feature. A feature request is any idea you have to improve the software experience that |
| 63 | + is not strictly related to a bug or error of omission. |
| 64 | + |
| 65 | +Feature requests that are accompanied by source code are always welcome. In this case you should read the next |
| 66 | + section on Creating a Pull Request. |
| 67 | + |
| 68 | +Feature requests without accompanying code will be closed. We simply cannot respond efficiently to feature requests |
| 69 | + through our Issue Tracker. If you want to suggest a feature, please use the mailing list or the user voice forum. |
| 70 | + |
| 71 | +### 3.3. How We Prioritize Issues |
| 72 | + |
| 73 | +We try our best to respond to all of the questions and issues our users have. We use the following criteria to |
| 74 | +prioritize issues: |
| 75 | + |
| 76 | +* Does this bug effect the latest stable release? |
| 77 | +* Is there a patch associated with the issue? |
| 78 | +* Is ther a test included in the patch? |
| 79 | +* Has someone else verified the bug? |
| 80 | +* Are there details on how to reproduce the problem? |
| 81 | +* We give highest priority to issues where the answer is “yes” to all of these questions. Next highest priority is for |
| 82 | + issues that answer “yes” to most of these questions, particularly the first few criteria. |
| 83 | + |
| 84 | +You need to include a brief description of the problem and simple steps needed to reproduce it. If you fail to |
| 85 | + supply this minimum level of information your issue will likely be ignored. |
| 86 | + |
| 87 | + |
| 88 | +4. Creating a Pull Request |
| 89 | +-------------------------- |
| 90 | + |
| 91 | +If you are going to contribute code to the Save Queue project, the best mechanism for doing this is to create a pull |
| 92 | + request in Github. If you’re unfamiliar with the general concept of pull requests you may want to read more on pull |
| 93 | + requests in Github. |
| 94 | + |
| 95 | +If your code is associated with an existing issue then you can provide a patch instead of creating a pull request. |
| 96 | + |
| 97 | +### 4.1. Creating a Fork |
| 98 | + |
| 99 | +The official Save Queue source code is maintained in Github under the AlexParamonov/save_queue |
| 100 | + |
| 101 | +You simply need to “fork” the project and then start hacking. |
| 102 | + |
| 103 | +See the Github guide on creating forks for more details. |
| 104 | + |
| 105 | +### 4.2. Topic Branches |
| 106 | + |
| 107 | +Git branches are “cheap.” Creating branches in Git is incredibly easy and its an ideal way to isolate a specific set |
| 108 | + of changes. You may be fixing several things at one time but by keeping your changes isolated it will help us to |
| 109 | + find and apply only the changes we’re interested in. You should create a clean branch based on the latest |
| 110 | + save_queue/master when doing this. It is important you follow these steps exactly, |
| 111 | + it will prevent you from accidentally including unrelated changes from your local repository into the branch. |
| 112 | + |
| 113 | +For example, if we were submitting a patch to fix an issue with the CSS in the flash error message you could create |
| 114 | + a branch as follows: |
| 115 | + |
| 116 | + $ git remote add upstream git://github.com/AlexParamonov/save_queue.git |
| 117 | + $ git fetch upstream |
| 118 | + $ git checkout -b fix-css-for-error-flash --track upstream/master |
| 119 | + |
| 120 | +The fetch command will grab all of the latest commits from the Save Queue master branch. Don’t worry, |
| 121 | + it doesn’t alter your working repository in a harmful way. The track part of the command will tell git that this |
| 122 | + branch should track with the remote version of the upstream master. This is another way of saying that the branch |
| 123 | + should be based on a clean copy of the latest official source code (without any of your unrelated local changes.) |
| 124 | + |
| 125 | +You can then do work locally on this topic branch and push it up to your Github fork when you are done. So in our |
| 126 | + previous example we do something like: |
| 127 | + |
| 128 | + $ git push origin fix-css-for-error-flash |
| 129 | + |
| 130 | +Of course if you want the fix for yourself to use in your own local code you should probably merge it down to your |
| 131 | + own personal master branch that you’re using for development |
| 132 | + |
| 133 | + $ git checkout master |
| 134 | + $ git merge fix-css-for-error-flash |
| 135 | + |
| 136 | +You should probably also clean up after yourself a little. The branch has been pushed to Github and you’ve merged it |
| 137 | + locally so you don’t really need a local copy of the branch laying around. |
| 138 | + |
| 139 | + $ git branch -D fix-css-for-error-flash |
| 140 | + |
| 141 | +### 4.3. Including a Test |
| 142 | + |
| 143 | +Ideally your pull request will also include a test that verifies a bug (or the absence of the new feature) before |
| 144 | + your fix and also verifies proper functionality when you are finished. Please read the Testing Guide for more |
| 145 | + information on writing and running your tests. |
| 146 | + |
| 147 | +Pull requests with tests are given top priority. Failure to include a test will likely delay acceptance of your patch. |
| 148 | + |
| 149 | +### 4.4. Creating the Pull Request |
| 150 | + |
| 151 | +Once your code is ready to go and you have pushed your topic branch to Github then you are ready to create the pull |
| 152 | + request and notify the Save Queue team that your contribution is ready. You do this by browsing your project in |
| 153 | + Github and changing to the topic branch you just pushed. Once you are on the topic branch simply create a pull |
| 154 | + request by pressing the “Pull Request” button. |
| 155 | + |
| 156 | +The Github guide on pull requests describes this in more detail with screenshots if you’re still confused on this |
| 157 | + part. |
| 158 | + |
| 159 | +5 Contributing to the Documentation |
| 160 | +----------------------------------- |
| 161 | +Improvements to the documentation is encouraged. |
0 commit comments