summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2013-04-04 16:52:27 -0700
committerDave Borowitz <dborowitz@google.com>2013-04-09 15:14:13 -0700
commit237073a9b00a048a482d7bd426800b292da02538 (patch)
treed33347c818c6ceee4648782920d9c12d968e8a50 /Documentation
parent2edf0ee8fe47dec47eb84bc82287fd4421848377 (diff)
Add a REST API endpoint for getting project configuration
To start, only expose the inheritable booleans stored in the project config, and only to users who can see refs/meta/config. Change-Id: I299a5317fb641e84b899f8240764c4902a34c72a
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/rest-api-projects.txt64
1 files changed, 64 insertions, 0 deletions
diff --git a/Documentation/rest-api-projects.txt b/Documentation/rest-api-projects.txt
index 9aba0e9133..a33f4c4d7c 100644
--- a/Documentation/rest-api-projects.txt
+++ b/Documentation/rest-api-projects.txt
@@ -408,6 +408,41 @@ link:#repository-statistics-info[RepositoryStatisticsInfo] entity.
}
----
+[[get-config]]
+Get Config
+~~~~~~~~~~
+[verse]
+'GET /projects/link:#project-name[\{project-name\}]/config'
+
+Gets some configuration information about a project. Note that this
+config info is not simply the contents of `project.config`; it generally
+contains fields that may have been inherited from parent projects.
+
+.Request
+----
+ GET /projects/myproject/config
+----
+
+A link:#config-info[ConfigInfo] entity is returned that describes the
+project configuration. Some fields are only visible to users that have
+read access to `refs/meta/config`.
+
+.Response
+----
+ HTTP/1.1 200 OK
+ Content-Disposition: attachment
+ Content-Type: application/json;charset=UTF-8
+
+ )]}'
+ {
+ "kind": "gerritcodereview#project_config",
+ "use_contributor_agreements": false,
+ "use_content_merge": true,
+ "use_signed_off_by": false,
+ "require_change_id": true
+ }
+----
+
[[run-gc]]
Run GC
~~~~~~
@@ -896,6 +931,35 @@ statistics of a Git repository.
|`size_of_packed_objects` |Size of packed objects in bytes.
|======================================
+[[config-info]]
+ConfigInfo
+~~~~~~~~~~
+The `ConfigInfo` entity contains information about the effective project
+configuration.
+
+Fields marked with * are only visible to users who have read access to
+`refs/meta/config`.
+
+[options="header",width="50%",cols="1,6"]
+|======================================
+|Field Name |Description
+|`use_contributor_agreements*`|
+If set, authors must complete a contributor agreement on the site
+before pushing any commits or changes to this project.
+|`use_content_merge*`|
+If set, Gerrit will try to perform a 3-way merge of text file content
+when a file has been modified by both the destination branch and the
+change being submitted. This option only takes effect if submit type is
+not FAST_FORWARD_ONLY.
+|`use_signed_off_by*`|
+If set, each change must contain a Signed-off-by line from either the
+author or the uploader in the commit message.
+|`require_change_id*`|
+If set, require a valid link:user-changeid.html[Change-Id] footer in any
+commit uploaded for review. This does not apply to commits pushed
+directly to a branch or tag.
+|======================================
+
GERRIT
------