|
| 1 | +### Introduction |
| 2 | + |
| 3 | +**Kodi** uses Github for development only, i.e. for *pull requests* and the review of such code. |
| 4 | +**Do not open** an issue on Github for your questions or bug reports. |
| 5 | +**Do not comment** on a *pull request* unless you are involved in the testing of such or have something meaningful to contribute. |
| 6 | +Not familiar with git? Start by looking at Github's [collaborating pages](https://help.github.com/categories/collaborating/). |
| 7 | + |
| 8 | +#### Questions about Kodi? |
| 9 | + |
| 10 | +To get your questions answered, please ask in the [Kodi community forum's](http://forum.kodi.tv/) or on **IRC:** [#kodi](http://webchat.freenode.net?nick=kodi-contrib&channels=%23kodi&prompt=1&uio=OT10cnVlde) on freenode.net |
| 11 | + |
| 12 | +#### Issue or bug reports and discussions |
| 13 | + |
| 14 | +Issue or bug reports must be send towards the add-on creator which can be found in each [[addon.xml]] (http://kodi.wiki/view/Addon.xml) file. |
| 15 | + |
| 16 | +If you can, we encourage you to investigate the issue yourself and create a [pull request](https://help.github.com/articles/creating-a-pull-request/) towards the original source of the code. We try to ask each add-on aythor to include this in the [[addon.xml]] (http://kodi.wiki/view/Addon.xml) file. Should this not be present then we advise you to find the dedicated add-on thread on the forum and ask there. |
| 17 | + |
| 18 | +For bug reports and related discussions, feature requests and all other support, please go to [Kodi community forum's](http://forum.kodi.tv/) and find the dedicated add-on thread. |
| 19 | + |
| 20 | +#### Pull Requests |
| 21 | + |
| 22 | +Before [creating a pull request](https://help.github.com/articles/creating-a-pull-request/), please read our general code guidelines that can be found at: |
| 23 | + |
| 24 | +- [Kodi add-on development](http://kodi.wiki/view/Add-on_development) |
| 25 | + |
| 26 | +###### General guidelines for creating pull requests: |
| 27 | +- **Create separate branches**. Don't ask us to pull from your master branch. |
| 28 | +- **One pull request per add-on**. If you want to do more than one, send multiple *pull requests*. |
| 29 | +- **Do not send us multiple commits**. Make sure each add-on only consists of a single commit in your *pull |
| 30 | + request*. |
| 31 | + If you had to make multiple intermediate commits while developing, please squash them before sending them to us. |
| 32 | + In the end before merging you may be asked to squash your commit even some more. |
| 33 | + |
| 34 | +###### Please follow these guidelines; it's the best way to get your work included in the repository! |
| 35 | + |
| 36 | +- [Click here](https://github.com/xbmc/repo-scripts/fork/) to fork the Kodi script repository, |
| 37 | + and [configure the remote](https://help.github.com/articles/configuring-a-remote-for-a-fork/): |
| 38 | + |
| 39 | + ```bash |
| 40 | + # Clone your fork of kodi's repo into the current directory in terminal |
| 41 | + git clone git@github.com:<your github username>/repo-scripts.git repo-scripts |
| 42 | + # Navigate to the newly cloned directory |
| 43 | + cd repo-scripts |
| 44 | + # Assign the original repo to a remote called "upstream" |
| 45 | + git remote add upstream https://github.com/xbmc/repo-scripts.git |
| 46 | + ``` |
| 47 | + |
| 48 | +- If you cloned a while ago, get the latest changes from upstream: |
| 49 | + |
| 50 | + ```bash |
| 51 | + # Fetch upstream changes |
| 52 | + git fetch upstream |
| 53 | + # Make sure you are on your 'master' branch |
| 54 | + git checkout master |
| 55 | + # Merge upstream changes |
| 56 | + git merge upstream/master |
| 57 | + ``` |
| 58 | + 'master' is only used as example here. Please replace it with the correct branch you want to submit your add-on towards. |
| 59 | + |
| 60 | +- Create a new branch to contain your new add-on or subsequent update: |
| 61 | + |
| 62 | + ```bash |
| 63 | + git checkout -b <add-on-branch-name> |
| 64 | + ``` |
| 65 | + |
| 66 | + The branch name isn't really relevant however a good suggestion is to name it like the addon ID. |
| 67 | + |
| 68 | +- Commit your changes in a single commit, or your *[pull request](https://help.github.com/articles/using-pull-requests)* is unlikely to be merged into the main repository. |
| 69 | + Use git's [interactive rebase](https://help.github.com/articles/interactive-rebase) |
| 70 | + feature to tidy up your commits before making them public. |
| 71 | + The commit for your add-on should have the following naming convention as the following example: |
| 72 | + |
| 73 | + ```bash |
| 74 | + [metadata.themoviedb.org] 3.0.0 |
| 75 | + ``` |
| 76 | + |
| 77 | + Your addon ID between brackets followed by the version number. |
| 78 | + |
| 79 | +- Push your topic branch up to your fork: |
| 80 | + |
| 81 | + ```bash |
| 82 | + git push origin <add-on-branch-name> |
| 83 | + ``` |
| 84 | + |
| 85 | +- Open a [pull request](https://help.github.com/articles/using-pull-requests) with a |
| 86 | + clear title and description. |
| 87 | + |
| 88 | +- Updating your [pull request](https://help.github.com/articles/using-pull-requests) can be done by applying your changes and squashing them in the already present commit. Afterwards you can force push these change and your pull request will be updated. |
| 89 | + |
| 90 | + ```bash |
| 91 | + git push --force origin <add-on-branch-name> |
| 92 | + ``` |
| 93 | + |
| 94 | +These examples use git command line. There are also git tools available that have a graphic interface and the steps above should be done in a similar way. Please consult the manual of those programs. |
| 95 | + |
0 commit comments