steampipe plugin install theapsgroup/gitlab

Table: gitlab_project_protected_branch

The gitlab_project_protected_branch table can be used to query information on protected branches associated with a specific project.

However, you must specify a project_id in the where or join clause.

Examples

Obtain protected branches for a specific project

select
id,
name,
allow_force_push,
code_owner_approval_required,
push_access_levels,
merge_access_levels,
unprotect_access_levels
from
gitlab_project_protected_branch
where
project_id = 1258;

Schema for gitlab_project_protected_branch

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
allow_force_pushbooleanIndicates if force pushing is allowed on the protected branch.
code_owner_approval_requiredbooleanIndicates if code owner approval is required.
idbigintThe ID of the protected branch.
merge_access_levelsjsonbArray of merge access levels.
nametextThe name of the protected branch.
project_idbigint=The ID of the project the protected branch belongs to - link `gitlab_project.id`.
push_access_levelsjsonbArray of push access levels.
unprotect_access_levelsjsonbArray of unprotected access levels.