blob: 22348083883e8e983194dee4cf52d3337d4f2a86 [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:
Michael Ochmannb99feab2016-07-06 14:10:22 +020015----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080016 mkdir cfg_dir
17 cd cfg_dir
18 git init
Michael Ochmannb99feab2016-07-06 14:10:22 +020019----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080020
21Download the existing configuration from Gerrit:
Michael Ochmannb99feab2016-07-06 14:10:22 +020022----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080023 git fetch ssh://localhost:29418/All-Projects refs/meta/config
24 git checkout FETCH_HEAD
Michael Ochmannb99feab2016-07-06 14:10:22 +020025----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080026
27Contributor agreements are defined as contributor-agreement sections in
28`project.config`:
Michael Ochmannb99feab2016-07-06 14:10:22 +020029----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080030 [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.
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080032 agreementUrl = static/cla_individual.html
33 autoVerify = group CLA Accepted - Individual
34 accepted = group CLA Accepted - Individual
Michael Ochmannb99feab2016-07-06 14:10:22 +020035----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080036
37Each `contributor-agreement` section within the `project.config` file must
38have a unique name. The section name will appear in the web UI.
39
David Pursehouse05d502f2016-08-22 17:46:31 +090040If not already present, add the group(s) used in the `autoVerify` and
41`accepted` variables in the `groups` file:
42----
43 # UUID Group Name
44 #
45 3dedb32915ecdbef5fced9f0a2587d164cd614d4 CLA Accepted - Individual
46----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080047
48Commit the configuration change, and push it back:
Michael Ochmannb99feab2016-07-06 14:10:22 +020049----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080050 git commit -a -m "Add Individual contributor agreement"
51 git push ssh://localhost:29418/All-Projects HEAD:refs/meta/config
Michael Ochmannb99feab2016-07-06 14:10:22 +020052----
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080053
54[[contributor-agreement.name.description]]contributor-agreement.<name>.description::
55+
56Short text describing the contributor agreement. This text will appear
57when the user selects an agreement.
58
Marc Petit-Hugueninbbb85492012-12-03 11:11:00 -080059[[contributor-agreement.name.agreementUrl]]contributor-agreement.<name>.agreementUrl::
60+
61An absolute URL or a relative path to an HTML file containing the text
62of the contributor agreement. The URL must use the http or https
63scheme. The path is relative to the `gerrit.basePath` variable in
64`gerrit.config`.
65
66[[contributor-agreement.name.autoVerify]]contributor-agreement.<name>.autoVerify::
67+
68If present, the user can sign the contributor agreement online. The
69value is the group to which the user will be added after signing the
70agreement. The group's UUID must also appear in the `groups` file.
71
72[[contributor-agreement.name.accepted]]contributor-agreement.<name>.accepted::
73+
74List of groups that will be considered when verifying that a
75contributor agreement has been accepted. The groups' UUID must also
76appear in the `groups` file.
77
78GERRIT
79------
80Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070081
82SEARCHBOX
83---------