|
| 1 | +.. _newcomer-guide: |
| 2 | + |
| 3 | +Welcome to the Newcomers guide! |
| 4 | +=============================== |
| 5 | + |
| 6 | +This guide will help you to get involved and teach you how to make your first |
| 7 | +contribution to *coala*! |
| 8 | + |
| 9 | +Meet the community! |
| 10 | +------------------- |
| 11 | + |
| 12 | +To get started, the first step is to meet the community. We use gitter to |
| 13 | +communicate, and there the helpful community will guide you. |
| 14 | +Join us at `coala gitter <https://gitter.im/coala-analyzer/coala/>`_. |
| 15 | +The newcomers should ping us "Hello World" to let us know they are here |
| 16 | +because we care! |
| 17 | + |
| 18 | +**Congratulations!** You are now part of our community. |
| 19 | + |
| 20 | +Start working |
| 21 | +------------- |
| 22 | + |
| 23 | +Let us know that you are interested in contributing on gitter and ask for an |
| 24 | +invitation to our org. This is your first step towards contributing. |
| 25 | +The invitation will be sent by mail and you will have to accept |
| 26 | +it to join. If you don't find the invitation, accept it `here <https://github.com/coala-analyzer>`_. |
| 27 | + |
| 28 | +Now that you are part of our organization, you can start working on issues. |
| 29 | +If you are familiar with git, you can skip the next section and pick an issue. |
| 30 | + |
| 31 | + |
| 32 | +Get help with git |
| 33 | +----------------- |
| 34 | + |
| 35 | +We use GitHub to manage our repository. If you're not familiar with git, we |
| 36 | +strongly recommend following a tutorial, such as `this one <https://try.github.io/levels/1/challenges/1>`_. |
| 37 | + |
| 38 | +If there's anything unclear, or you are encountering problems, feel free |
| 39 | +to contact us on gitter, and we will help you! |
| 40 | + |
| 41 | +Picking up an issue |
| 42 | +------------------- |
| 43 | + |
| 44 | +Now is the time to pick an issue. |
| 45 | +Here is the link that will lead you to `Newcomers issues <http://tinyurl.com/coala-new>`_. |
| 46 | + |
| 47 | +.. seealso:: |
| 48 | + |
| 49 | + For more information about what bears are, please check the following link: `Writing bears <http://coala.readthedocs.org/en/latest/Users/Tutorials/Writing_Bears.html>`_ |
| 50 | + |
| 51 | +The easy issues that will help you get started are labeled as |
| 52 | +"difficulty/newcomer" and are only there to give you a glimpse of how it is |
| 53 | +to work with us. |
| 54 | + |
| 55 | +Now pick an issue which isn't assigned, and if you want to fix |
| 56 | +it, then leave a comment that you would like to get assigned. This way |
| 57 | +we don't have multiple people working on the same issue at the same time. |
| 58 | +Now you can start working on it. |
| 59 | +For more info on how to work correctly with git, try `this <http://coala.readthedocs.org/en/latest/Users/Tutorials/Git_Help.html>`_. |
| 60 | + |
| 61 | +.. note:: |
| 62 | + |
| 63 | + Before starting to write your first commit, check out this link: |
| 64 | + `Writing good commits <http://coala.readthedocs.org/en/latest/Getting_Involved/Writing_Good_Commits.html>`_ |
| 65 | + |
| 66 | +Things to do before pushing |
| 67 | +--------------------------- |
| 68 | + |
| 69 | +Now you need to make sure your change is actually working. For this, you will |
| 70 | +need to test it locally before pushing it to your fork, and checking it with |
| 71 | +concrete examples. So basically, run tests and run *coala* by simply typing |
| 72 | + |
| 73 | +:: |
| 74 | + |
| 75 | + $ coala |
| 76 | + |
| 77 | +into your bash. This will analyze your code and help you fix it. |
| 78 | + |
| 79 | +.. seealso:: |
| 80 | + |
| 81 | + `Executing tests <http://coala.readthedocs.org/en/latest/Getting_Involved/Testing.html>`_ |
| 82 | + |
| 83 | +Sending your changes |
| 84 | +-------------------- |
| 85 | + |
| 86 | +Now that you've fixed the issue, you've tested it and you think it is ready |
| 87 | +to be used, create a commit and push it to your fork, using: |
| 88 | + |
| 89 | +:: |
| 90 | + |
| 91 | + $ git push origin fix-branch |
| 92 | + |
| 93 | +Creating a ``Pull Request`` |
| 94 | +--------------------------- |
| 95 | + |
| 96 | +Now that your commit has been sent to your fork, it is time |
| 97 | +to do a ``Pull Request``. It can be done by accessing your fork on GitHub and |
| 98 | +clicking ``New Pull Request``. |
| 99 | + |
| 100 | +**Congratulations!** You have now created your first ``Pull Request``! |
| 101 | + |
| 102 | +If you know you have more work to do on this pull request before it is |
| 103 | +ready to be accepted, you can optionally indicate this to other |
| 104 | +developers by starting your pull request title with "wip" |
| 105 | +(case-insensitive). |
| 106 | + |
| 107 | +What to do after creating a ``Pull Request`` |
| 108 | +-------------------------------------------- |
| 109 | + |
| 110 | +After creating your ``Pull Request``, there's two options: |
| 111 | + |
| 112 | +- your ``Pull Request`` gets accepted, and your commit will get merged into the |
| 113 | + master branch |
| 114 | +- your ``Pull Request`` doesn't get accepted, and therefore you will |
| 115 | + need to to modify it as per the review comments |
| 116 | + |
| 117 | +It's highly unlikely that your ``Pull Request`` will be accepted on the first |
| 118 | +attempt - but don't worry, that's just how it works. It helps us maintain |
| 119 | +*coala* **clean** and **stable**. |
| 120 | + |
| 121 | +.. seealso:: |
| 122 | + |
| 123 | + `Review Process <http://coala.readthedocs.org/en/latest/Getting_Involved/Review.html>`_. |
| 124 | + |
| 125 | +Now if you need to modify your code, you can simply edit it again, add it and |
| 126 | +commit it using |
| 127 | + |
| 128 | +:: |
| 129 | + |
| 130 | + $ git commit -a --amend |
| 131 | + |
| 132 | +This will edit your last commit message. If your commit message was considered |
| 133 | +fine by our reviewers, you can simply send it again like this. If not, edit it |
| 134 | +and send it. You have successfully edited your last commit! |
| 135 | + |
| 136 | +.. note:: |
| 137 | + |
| 138 | + Don't forget! After editing your commit, you will have to push it again. |
| 139 | + This can be done using: |
| 140 | + |
| 141 | +:: |
| 142 | + |
| 143 | + $ git push --force origin |
| 144 | + |
| 145 | +**Congratulations!** Your PR just got accepted! You're awesome. |
| 146 | +Now try `writing a bear <http://coala.readthedocs.org/en/latest/Users/Tutorials/Writing_Bears.html>`_, |
| 147 | +they are really rewarding! |
0 commit comments