blob: 624135cb915697ed7a17491b84d988cfd80da2a5 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - Contributor Agreements
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -08002
3Users can be required to sign one or more contributor agreements before
4being able to submit a change in a project.
5
6Contributor agreements are global and can be configured by modifying
7the `project.config` file on the `All-Projects` project. Push permission
8needs to be granted for the `refs/meta/config` branch to be able to push
9back the `project.config` file. Consult
10link:access-control.html[access controls] for details on how access
11permissions work.
12
13To retrieve the `project.config` file, initialize a temporary Git
14repository to edit the configuration:
15====
16 mkdir cfg_dir
17 cd cfg_dir
18 git init
19====
20
21Download the existing configuration from Gerrit:
22====
23 git fetch ssh://localhost:29418/All-Projects refs/meta/config
24 git checkout FETCH_HEAD
25====
26
27Contributor 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
38Each `contributor-agreement` section within the `project.config` file must
39have a unique name. The section name will appear in the web UI.
40
41If not already present, add the UUID of the groups used in the
42`autoVerify` and `accepted` variables in the groups file.
43
44Commit 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+
52Short text describing the contributor agreement. This text will appear
53when the user selects an agreement.
54
55[[contributor-agreement.name.requireContactInformation]]contributor-agreement.<name>.requireContactInformation::
56+
57True if the user must provide contact information when signing a
58contributor agreement. Default is false.
59
60[[contributor-agreement.name.agreementUrl]]contributor-agreement.<name>.agreementUrl::
61+
62An absolute URL or a relative path to an HTML file containing the text
63of the contributor agreement. The URL must use the http or https
64scheme. The path is relative to the `gerrit.basePath` variable in
65`gerrit.config`.
66
67[[contributor-agreement.name.autoVerify]]contributor-agreement.<name>.autoVerify::
68+
69If present, the user can sign the contributor agreement online. The
70value is the group to which the user will be added after signing the
71agreement. The group's UUID must also appear in the `groups` file.
72
73[[contributor-agreement.name.accepted]]contributor-agreement.<name>.accepted::
74+
75List of groups that will be considered when verifying that a
76contributor agreement has been accepted. The groups' UUID must also
77appear in the `groups` file.
78
79GERRIT
80------
81Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070082
83SEARCHBOX
84---------