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
This commit is contained in:
@@ -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
|
||||
------
|
||||
|
||||
Reference in New Issue
Block a user