Set Project Push Rules
PUT/api/v5/repos/:owner/:repo/push_config
Request
Path Parameters
owner stringrequired
Repository space address (organization or individual's address path)
repo stringrequired
Repository path (path)
Query Parameters
access_token stringrequired
User authorization code
- application/json
Body
reject_not_signed_by_gpgboolean
Only signed submissions with authentication are allowed.
commit_message_regexstring
Submit information validation
max_file_sizeinteger
Submission file limit (in MB)
skip_rule_for_ownerboolean
The submission of the project administrator is not restricted by the above rules.
deny_force_pushboolean
No强制推送 (including administrators)
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- 1
Schema
reject_not_signed_by_gpginteger
deny_force_pushinteger
max_file_sizeinteger
skip_rule_for_ownerinteger
{
"reject_not_signed_by_gpg": 0,
"deny_force_push": 0,
"max_file_size": 0,
"skip_rule_for_owner": 0
}
Successful Example
{
"reject_not_signed_by_gpg": false,
"deny_force_push": true,
"max_file_size": 10,
"skip_rule_for_owner": false
}