|
1 |
| -#Issues |
| 1 | +# Issues |
2 | 2 |
|
3 |
| -## Opening an Issue |
| 3 | +Read the [issue guidlines](.github/ISSUE_TEMPLATE.md) before opening an issue! |
4 | 4 |
|
5 |
| -To open an issue, please keep in mind a few important things. First, take a look at the README docs and make sure that your question isn't already answered in the documentation. In particular, review [the configuration methods](https://github.com/mgonto/restangular#configuring-restangular) and [methods description](https://github.com/mgonto/restangular#methods-description). Then make sure you search the issues list to see if there's already an issue open that solves your problem. Then, once you've determined that your issue isn't a duplicate, here a couple guidelines to opening an issue that will be addressed easily and quickly: |
| 5 | +# How to submit PRs |
6 | 6 |
|
7 |
| -- Please make sure your issue is written in a clear and succint manner, so that all the details of your issue are easy to understand and fully explained. Also, please make sure enclose your code in [fenced blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) for readability. |
8 |
| -- Make sure your issue includes a live Plunker (fork [this Plunker](http://plnkr.co/edit/26Heuv5F6hUgxpNWNTee?p=info)), and all relevant code samples (as well as information about server responses, if relevant) |
| 7 | +## Install env |
9 | 8 |
|
10 |
| -# PRs |
11 |
| - |
12 |
| -##Install env |
13 |
| - |
14 |
| -In order to contribute just git clone the repository and then run: |
| 9 | +In order to contribute just create your own [fork](https://help.github.com/articles/fork-a-repo/) |
| 10 | +of the repository and then run: |
15 | 11 |
|
16 | 12 | ```
|
17 |
| -git clone git@github.com:mgonto/restangular.git |
| 13 | +git clone git@github.com:<your_username>/restangular.git |
18 | 14 | cd restangular
|
19 | 15 | npm install grunt-cli --global
|
20 | 16 | npm install
|
21 | 17 | ```
|
22 | 18 |
|
23 |
| -Be sure to have PhantomJS installed as Karma tests use it. Otherwise, in Mac just run |
| 19 | +## Create a branch |
24 | 20 |
|
25 |
| -``` |
26 |
| -brew install phantomjs |
27 |
| -``` |
| 21 | +Create a branch for your code changes |
28 | 22 |
|
29 |
| -All changes must be done in src/restangular.js |
| 23 | +`git checkout -b my_awesome_fix` |
30 | 24 |
|
31 |
| -##Branching |
| 25 | +## Write tests |
32 | 26 |
|
33 |
| -Please submit a Pull Request or create issues for anything you want :). If your code is super small, nobody will blame |
34 |
| -you for doing it from master to master. Otherwise, please try to create a branch `features/[name of your awesome feature]`. |
| 27 | +When making changes to the code, please always **write a test case** for |
| 28 | +your topic before making the change. Watch the test fail, then |
| 29 | +implement the change and watch the test succeed. |
35 | 30 |
|
36 |
| -##Testing and styling |
| 31 | +Tests are run with `grunt test`. |
37 | 32 |
|
38 |
| -Before submitting any PR, you should run `grunt test` to validate your didn't break anything. If you just added a new |
39 |
| -feature, please also add tests for it. And when you're done with your code, run `grunt jshint` to check |
| 33 | +## Keep the style |
| 34 | + |
| 35 | +When you're done with your code, run `grunt jshint` to check |
40 | 36 | if you code follow the same simple coding design as the rest of the project.
|
| 37 | +Consider integrating `jshint` in your editor to get real time feedback on your |
| 38 | +style as you're coding. |
| 39 | + |
| 40 | +## Commit message format |
| 41 | + |
| 42 | +Please write your commit messages in the [angular conventional changelog](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md) format. This will help |
| 43 | +us to keep a decent [CHANGELOG](CHANGELOG.md) with minimum effort. Check previous commit |
| 44 | +messages for examples. |
| 45 | + |
| 46 | +## Update docs |
| 47 | + |
| 48 | +If your code change includes new features, please include an update to the [README.md](README.md) |
| 49 | +explaining your feature. |
| 50 | + |
| 51 | +**Don't**, however, generate distribution files (the files in [dist](dist)). This will be done |
| 52 | +on a regular basis by maintainers as PRs are merged. |
| 53 | + |
| 54 | +## Squash commits |
| 55 | + |
| 56 | +Please consider squasing the commits in your topic branch into a single commit including |
| 57 | +all changes needed. This will make the PR cleaner and the change history more easy to follow |
| 58 | +after the PR has been merged. Also, the CHANGELOG will make more sense. |
| 59 | + |
| 60 | +Look [here](https://ariejan.net/2011/07/05/git-squash-your-latests-commits-into-one/) and |
| 61 | +[here](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits) for how to. |
| 62 | + |
| 63 | +## Sumbit the PR |
| 64 | + |
| 65 | +Now you're ready to [open a PR](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). |
41 | 66 |
|
42 | 67 | Thanks!
|
0 commit comments