|
| 1 | +# Contributing to Akavache |
| 2 | + |
| 3 | +We'd love for you to contribute to our source code and to make Akavache even better than it is |
| 4 | +today! Here are the guidelines we'd like you to follow: |
| 5 | + |
| 6 | + - [Code of Conduct](#coc) |
| 7 | + - [Question or Problem?](#question) |
| 8 | + - [Issues and Bugs](#issue) |
| 9 | + - [Feature Requests](#feature) |
| 10 | + - [Submission Guidelines](#submit) |
| 11 | + - [Coding Rules](#rules) |
| 12 | + - [Commit Message Guidelines](#commit) |
| 13 | + |
| 14 | +## <a name="coc"></a> Code of Conduct |
| 15 | + |
| 16 | +Help us keep the project open and inclusive. Please read and follow our [Code of Conduct][coc]. |
| 17 | + |
| 18 | +## <a name="question"></a> Got a Question or Problem? |
| 19 | + |
| 20 | +If you have questions about how to use Akavache, please direct these to [StackOverflow](https://stackoverflow.com/questions/tagged/Akavache). The project maintainers hang out in this [Slack](https://github.com/reactiveui/reactiveui#slack) channel. |
| 21 | + |
| 22 | +## <a name="issue"></a> Found an Issue? |
| 23 | + |
| 24 | +If you find a bug in the source code or a mistake in the documentation, you can help us by |
| 25 | +submitting an issue to our [GitHub Repository](https://github.com/akavache/akavache). Even better you can submit a Pull Request |
| 26 | +with a fix. |
| 27 | + |
| 28 | +**Please see the [Submission Guidelines](#submit) below.** |
| 29 | + |
| 30 | +## <a name="feature"></a> Want a Feature? |
| 31 | + |
| 32 | +You can request a new feature by submitting an issue to our [GitHub Repository](https://github.com/akavache/Akavache). If you |
| 33 | +would like to implement a new feature then consider what kind of change it is: |
| 34 | + |
| 35 | +* **Major Changes** that you wish to contribute to the project should be discussed first in [Slack](https://github.com/reactiveui/reactiveui#slack) so that we can better coordinate our efforts, |
| 36 | + prevent duplication of work, and help you to craft the change so that it is successfully accepted |
| 37 | + into the project. |
| 38 | +* **Small Changes** can be crafted and submitted to the [GitHub Repository](https://github.com/akavache/Akavache) as a Pull |
| 39 | + Request. |
| 40 | + |
| 41 | +## <a name="submit"></a> Submission Guidelines |
| 42 | + |
| 43 | +### Submitting an Issue |
| 44 | + |
| 45 | +If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize |
| 46 | +the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. |
| 47 | + |
| 48 | +Providing the following information will increase the chances of your issue being dealt with |
| 49 | +quickly: |
| 50 | + |
| 51 | +* **Overview of the Issue** - if an error is being thrown a stack trace helps |
| 52 | +* **Motivation for or Use Case** - explain why this is a bug for you |
| 53 | +* **Akavache Version(s)** - is it a regression? |
| 54 | +* **Operating System** - is this a problem with all browsers or only specific ones? |
| 55 | +* **Reproduce the Error** - provide a example or an unambiguous set of steps. |
| 56 | +* **Related Issues** - has a similar issue been reported before? |
| 57 | +* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be |
| 58 | + causing the problem (line of code or commit) |
| 59 | + |
| 60 | +**If you get help, help others. Good karma rulez!** |
| 61 | + |
| 62 | +### Submitting a Pull Request |
| 63 | +Before you submit your pull request consider the following guidelines: |
| 64 | + |
| 65 | +* Search [GitHub](https://github.com/akavache/akavache/pulls) for an open or closed Pull Request |
| 66 | + that relates to your submission. You don't want to duplicate effort. |
| 67 | +* Make your changes in a new git branch: |
| 68 | + |
| 69 | + ```shell |
| 70 | + git checkout -b my-fix-branch master |
| 71 | + ``` |
| 72 | + |
| 73 | +* Create your patch, **including appropriate test cases**. |
| 74 | +* Follow our [Coding Rules](#rules). |
| 75 | +* Run the test suite, as described below. |
| 76 | +* Commit your changes using a descriptive commit message that follows our |
| 77 | + [commit message conventions](#commit). |
| 78 | + |
| 79 | + ```shell |
| 80 | + git commit -a |
| 81 | + ``` |
| 82 | + Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. |
| 83 | + |
| 84 | +* Build your changes locally to ensure all the tests pass: |
| 85 | + |
| 86 | + ```shell |
| 87 | + build.cmd |
| 88 | + ``` |
| 89 | + |
| 90 | +* Push your branch to GitHub: |
| 91 | + |
| 92 | + ```shell |
| 93 | + git push origin my-fix-branch |
| 94 | + ``` |
| 95 | + |
| 96 | +In GitHub, send a pull request to `akavache:master`. |
| 97 | + |
| 98 | +If we suggest changes, then: |
| 99 | + |
| 100 | +* Make the required updates. |
| 101 | +* Re-run the test suite to ensure tests are still passing. |
| 102 | +* Commit your changes to your branch (e.g. `my-fix-branch`). |
| 103 | +* Push the changes to your GitHub repository (this will update your Pull Request). |
| 104 | + |
| 105 | +If the PR gets too outdated we may ask you to rebase and force push to update the PR: |
| 106 | + |
| 107 | +```shell |
| 108 | +git rebase master -i |
| 109 | +git push origin my-fix-branch -f |
| 110 | +``` |
| 111 | + |
| 112 | +_WARNING: Squashing or reverting commits and force-pushing thereafter may remove GitHub comments |
| 113 | +on code that were previously made by you or others in your commits. Avoid any form of rebasing |
| 114 | +unless necessary._ |
| 115 | + |
| 116 | +That's it! Thank you for your contribution! |
| 117 | +
|
| 118 | +#### After your pull request is merged |
| 119 | +
|
| 120 | +After your pull request is merged, you can safely delete your branch and pull the changes |
| 121 | +from the main (upstream) repository: |
| 122 | +
|
| 123 | +* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: |
| 124 | +
|
| 125 | + ```shell |
| 126 | + git push origin --delete my-fix-branch |
| 127 | + ``` |
| 128 | +
|
| 129 | +* Check out the master branch: |
| 130 | +
|
| 131 | + ```shell |
| 132 | + git checkout master -f |
| 133 | + ``` |
| 134 | +
|
| 135 | +* Delete the local branch: |
| 136 | +
|
| 137 | + ```shell |
| 138 | + git branch -D my-fix-branch |
| 139 | + ``` |
| 140 | +
|
| 141 | +* Update your master with the latest upstream version: |
| 142 | +
|
| 143 | + ```shell |
| 144 | + git pull --ff upstream master |
| 145 | + ``` |
| 146 | +
|
| 147 | +## <a name="rules"></a> Coding Rules |
| 148 | +
|
| 149 | +To ensure consistency throughout the source code, keep these rules in mind as you are working: |
| 150 | +
|
| 151 | +* All features or bug fixes **must be tested** by one or more unit tests. |
| 152 | +* All public API methods **must be documented** with XML documentation. |
| 153 | +
|
| 154 | +## <a name="commit"></a> Git Commit Guidelines |
| 155 | +
|
| 156 | +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special |
| 157 | +format that includes a **type** and a **subject**: |
| 158 | +
|
| 159 | +``` |
| 160 | +<type>: <subject> |
| 161 | +<body> |
| 162 | +<BLANK LINE> |
| 163 | +<footer> |
| 164 | +``` |
| 165 | +
|
| 166 | +### Revert |
| 167 | +
|
| 168 | +If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. |
| 169 | +
|
| 170 | +### Type |
| 171 | +
|
| 172 | +Must be one of the following: |
| 173 | +
|
| 174 | +* **feat**: A new feature |
| 175 | +* **fix**: A bug fix |
| 176 | +* **docs**: Documentation only changes |
| 177 | +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing |
| 178 | + semi-colons, etc) |
| 179 | +* **refactor**: A code change that neither fixes a bug nor adds a feature |
| 180 | +* **perf**: A code change that improves performance |
| 181 | +* **test**: Adding missing tests |
| 182 | +* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation |
| 183 | + generation |
| 184 | +
|
| 185 | +### Subject |
| 186 | +The subject contains succinct description of the change: |
| 187 | +
|
| 188 | +* use the imperative, present tense: "change" not "changed" nor "changes" |
| 189 | +* don't capitalize first letter |
| 190 | +* no dot (.) at the end |
| 191 | + |
| 192 | +### Body |
| 193 | +Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". |
| 194 | +The body should include the motivation for the change and contrast this with previous behavior. |
| 195 | + |
| 196 | +### Footer |
| 197 | +The footer should contain any information about **Breaking Changes** and is also the place to |
| 198 | +reference GitHub issues that this commit **Closes**. |
| 199 | + |
| 200 | +**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this. |
0 commit comments