Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - Contributor Agreements |
Marc Petit-Huguenin | bbb8549 | 2012-12-03 11:11:00 -0800 | [diff] [blame] | 2 | |
| 3 | Users can be required to sign one or more contributor agreements before |
| 4 | being able to submit a change in a project. |
| 5 | |
| 6 | Contributor agreements are global and can be configured by modifying |
| 7 | the `project.config` file on the `All-Projects` project. Push permission |
| 8 | needs to be granted for the `refs/meta/config` branch to be able to push |
| 9 | back the `project.config` file. Consult |
| 10 | link:access-control.html[access controls] for details on how access |
| 11 | permissions work. |
| 12 | |
| 13 | To retrieve the `project.config` file, initialize a temporary Git |
| 14 | repository to edit the configuration: |
| 15 | ==== |
| 16 | mkdir cfg_dir |
| 17 | cd cfg_dir |
| 18 | git init |
| 19 | ==== |
| 20 | |
| 21 | Download the existing configuration from Gerrit: |
| 22 | ==== |
| 23 | git fetch ssh://localhost:29418/All-Projects refs/meta/config |
| 24 | git checkout FETCH_HEAD |
| 25 | ==== |
| 26 | |
| 27 | Contributor agreements are defined as contributor-agreement sections in |
| 28 | `project.config`: |
| 29 | ==== |
| 30 | [contributor-agreement "Individual"] |
| 31 | description = If you are going to be contributing code on your own, this is the one you want. You can sign this one online. |
| 32 | requireContactInformation = true |
| 33 | agreementUrl = static/cla_individual.html |
| 34 | autoVerify = group CLA Accepted - Individual |
| 35 | accepted = group CLA Accepted - Individual |
| 36 | ==== |
| 37 | |
| 38 | Each `contributor-agreement` section within the `project.config` file must |
| 39 | have a unique name. The section name will appear in the web UI. |
| 40 | |
| 41 | If not already present, add the UUID of the groups used in the |
| 42 | `autoVerify` and `accepted` variables in the groups file. |
| 43 | |
| 44 | Commit the configuration change, and push it back: |
| 45 | ==== |
| 46 | git commit -a -m "Add Individual contributor agreement" |
| 47 | git push ssh://localhost:29418/All-Projects HEAD:refs/meta/config |
| 48 | ==== |
| 49 | |
| 50 | [[contributor-agreement.name.description]]contributor-agreement.<name>.description:: |
| 51 | + |
| 52 | Short text describing the contributor agreement. This text will appear |
| 53 | when the user selects an agreement. |
| 54 | |
| 55 | [[contributor-agreement.name.requireContactInformation]]contributor-agreement.<name>.requireContactInformation:: |
| 56 | + |
| 57 | True if the user must provide contact information when signing a |
| 58 | contributor agreement. Default is false. |
| 59 | |
| 60 | [[contributor-agreement.name.agreementUrl]]contributor-agreement.<name>.agreementUrl:: |
| 61 | + |
| 62 | An absolute URL or a relative path to an HTML file containing the text |
| 63 | of the contributor agreement. The URL must use the http or https |
| 64 | scheme. The path is relative to the `gerrit.basePath` variable in |
| 65 | `gerrit.config`. |
| 66 | |
| 67 | [[contributor-agreement.name.autoVerify]]contributor-agreement.<name>.autoVerify:: |
| 68 | + |
| 69 | If present, the user can sign the contributor agreement online. The |
| 70 | value is the group to which the user will be added after signing the |
| 71 | agreement. The group's UUID must also appear in the `groups` file. |
| 72 | |
| 73 | [[contributor-agreement.name.accepted]]contributor-agreement.<name>.accepted:: |
| 74 | + |
| 75 | List of groups that will be considered when verifying that a |
| 76 | contributor agreement has been accepted. The groups' UUID must also |
| 77 | appear in the `groups` file. |
| 78 | |
| 79 | GERRIT |
| 80 | ------ |
| 81 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 82 | |
| 83 | SEARCHBOX |
| 84 | --------- |