OLD | NEW |
1 # Contributing to the Custom Tabs Examples | 1 # Contributing to the Custom Tabs Examples |
2 Want to contribute? Great! First, read this page (including the small print at t
he end). | 2 Want to contribute? Great! First, read this page. |
3 | 3 |
4 ### Before you contribute | 4 ## Before you contribute |
5 Before we can use your code, you must sign the | 5 Before we can use your code, you must sign the |
6 [Google Individual Contributor License Agreement](https://developers.google.com/
open-source/cla/individual?csw=1) | 6 [Google Individual Contributor License Agreement](https://developers.google.com/
open-source/cla/individual?csw=1) |
7 (CLA), which you can do online. The CLA is necessary mainly because you own the | 7 (CLA), which you can do online, and it only takes a minute. |
8 copyright to your changes, even after your contribution becomes part of our | |
9 codebase, so we need your permission to use and distribute your code. We also | |
10 need to be sure of various other things—for instance that you'll tell us if you | |
11 know that your code infringes on other people's patents. You don't have to sign | |
12 the CLA until after you've submitted your code for review and a member has | |
13 approved it, but you must do it before we can put your code into our codebase. | |
14 Before you start working on a larger contribution, you should get in touch with | |
15 us first through the issue tracker with your idea so that we can help out and | |
16 possibly guide you. Coordinating up front makes it much easier to avoid | |
17 frustration later on. | |
18 | 8 |
19 ### Code reviews | 9 The CLA is necessary mainly because you own the copyright to your changes, even |
| 10 after your contribution becomes part of our codebase, so we need your permission |
| 11 to use and distribute your code. We also need to be sure of various other |
| 12 things—for instance that you'll tell us if you know that your code infringes on |
| 13 other people's patents. You don't have to sign the CLA until after you've |
| 14 submitted your code for review and a member has approved it, but you must do it |
| 15 before we can put your code into our codebase. Before you start working on a |
| 16 larger contribution, you should get in touch with us first through the issue |
| 17 tracker with your idea so that we can help out and possibly guide you. |
| 18 Coordinating up front makes it much easier to avoid frustration later on. |
| 19 |
| 20 If you are contributing on behalf of a corporation, you must fill out the |
| 21 [Corporate Contributor License Agreement](https://cla.developers.google.com/abou
t/google-corporate?csw=1) |
| 22 and send it to us as described on that page. |
| 23 |
| 24 If you've never submitted code before, you must add your (or your |
| 25 organization's) name and contact info to the Chromium AUTHORS file. |
| 26 |
| 27 ## Contributing |
20 All submissions, including submissions by project members, require review. We | 28 All submissions, including submissions by project members, require review. We |
21 use http://codereview.chromium.org for this purpose. The process will be very | 29 use [Rietveld](http://codereview.chromium.org) instance for this purpose. |
22 similar to the one used in the [Catapult | |
23 Project](https://github.com/catapult-project/catapult/blob/master/CONTRIBUTING.m
d). | |
24 More details soon. | |
25 | 30 |
26 ### The small print | 31 Install [depot_tools](https://www.chromium.org/developers/how-tos/install-depot-
tools). |
27 Contributions made by corporations are covered by a different agreement than | 32 |
28 the one above, the Software Grant and Corporate Contributor License Agreement. | 33 Then checkout the repo. |
| 34 |
| 35 `git clone https://github.com/GoogleChrome/custom-tabs-client.git` |
| 36 |
| 37 You can then create a local branch, make and commit your change. |
| 38 |
| 39 ``` |
| 40 cd custom-tabs-client |
| 41 git checkout -b foo origin/master |
| 42 ... edit files ... |
| 43 git commit -a |
| 44 ``` |
| 45 |
| 46 Once you're ready for a review do: |
| 47 |
| 48 `git cl upload` |
| 49 |
| 50 Once uploaded you can view the CL in Rietveld and request a review by clicking |
| 51 the 'publish & mail' link. The |
| 52 [OWNERS](https://github.com/GoogleChrome/custom-tabs-client/blob/master/OWNERS) |
| 53 file suggests relevant reviewers, but does not have any real power, any Chromium |
| 54 committer has the power to approve the change. |
| 55 |
| 56 If you get review feedback, edit and commit locally and then do another upload |
| 57 with the new files. Before you commit you'll want to sync to the tip-of-tree. |
| 58 You can either merge or rebase, it's up to you. |
| 59 |
| 60 Then, submit your changes through the commit queue by checking the "Commit" box. |
| 61 |
| 62 Once everything is landed, you can cleanup your branch. |
| 63 |
| 64 ``` |
| 65 git checkout master |
| 66 git branch -D foo |
| 67 ``` |
| 68 |
| 69 ## Contributing from a Chromium checkout |
| 70 |
| 71 If you already have this repo checked out as part of a Chromium checkout and wan
t |
| 72 to edit it in place (instead of having a separate clone of the repository), it |
| 73 will require a little more Git skills. |
| 74 |
| 75 Add another remote: |
| 76 |
| 77 ``` |
| 78 git remote add github https://github.com/GoogleChrome/custom-tabs-client.git |
| 79 git fetch github |
| 80 ``` |
| 81 |
| 82 When branching, remember to branch from the right repo: |
| 83 |
| 84 ``` |
| 85 git checkout -b foo github/master |
| 86 ``` |
| 87 |
| 88 When doing `gclient sync` in the Chromium tree, remember to switch back to the |
| 89 local branch `master`. |
| 90 |
| 91 ## Updating Custom Tabs Examples in the Chromium tree (rolling DEPS) |
| 92 To get your commit to be tested as part of the Chromium tree in |
| 93 `src/third_party/custom_tabs_client`, find the git hash of your commit on the |
| 94 [mirror](https://chromium.googlesource.com/external/github.com/GoogleChrome/cust
om-tabs-client/). |
| 95 (Note: it may take a few minutes to be mirrored). |
| 96 |
| 97 Then edit Chrome's [src/DEPS] |
| 98 (https://code.google.com/p/chromium/codesearch#chromium/src/DEPS) file. Look for |
| 99 a line like: |
| 100 |
| 101 ``` |
| 102 'src/third_party/custom_tabs_client/src': |
| 103 Var('chromium_git') + '/external/github.com/GoogleChrome/custom-tabs-client.gi
t' + '@' + |
| 104 'bbbf71f41e79b0cfe21199220f495cbd0a3a4ffb', |
| 105 ``` |
| 106 |
| 107 Update the value to the git hash you want to roll to, and [contribute a |
| 108 codereview to Chromium](http://www.chromium.org/developers/contributing-code) |
| 109 for your edit. If you are a Chromium committer, feel free to TBR this. |
OLD | NEW |