Skip to content

New default branch protection json field

Harsimar Sandhu requested to merge 408151-default-branch-protection-api into master

What does this MR do and why?

New default branch protection json field

This commit enables accepting of new default branch protection json field in application setting grape and controller api

Changelog: added

Screenshots or screen recordings

How to set up and validate locally

  1. Use the below curl to test this API, edit the values to test it accepted value for access_level is 30 or 40.
curl --location --request PUT 'http://GDK_BASE_URL/api/v4/application/settings' \
--header 'Authorization: Bearer "YOUR TOKEN HERE"' \
--header 'Content-Type: application/json' \
--data-raw '{
    "default_branch_protection_defaults": {
        "allowed_to_push": [
            {
                "access_level": 30
            }
        ],
        "allow_force_push": true,
        "allowed_to_merge": [
            {
                "access_level": 40
            }
        ]
    }
}'

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #408151 (closed)

Edited by Harsimar Sandhu

Merge request reports