steampipe plugin install theapsgroup/gitlab

Table: gitlab_project_repository_file

The gitlab_project_repository_file can be used to obtain file information/contents for a single file from within a repository.

However, you must specify a project_id and a file_path for the file in the where or join clauses.

NOTE: Optionally you may provide a ref in the where or join clauses to specify a specific branch, tag or commit - the default value for ref is main.

Examples

Obtain information about the README.md from a specific project

select
*
from
gitlab_project_repository_file
where
project_id = 123
and file_path = 'README.md';

Obtain information from a file in a sub-folder

select
*
from
gitlab_project_repository_file
where
project_id = 123
and file_path = 'folder/other_folder/file.ext';

Schema for gitlab_project_repository_file

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
blob_idtextThe blob ID of the file, can be used to obtain the blob
commit_idtextThe ID of the last commit which affected the file, can be used to pull the commit
contenttextThe content of the file, encoded as per the encoded field
content_sha256textThe SHA256 hash of the file content
encodingtextThe encoding used on the Content field value
execute_filemodebooleanIndicates if the file has execution permissions.
file_nametextThe name of the file
file_pathtext=The path of the file
project_idbigint=The ID of the project this repository file belongs to - link `gitlab_project.id`.
reftext=The repository ref (tag, branch, etc)
sizebigintThe size of the file