gitlab_applicationgitlab_branchgitlab_commitgitlab_epicgitlab_groupgitlab_group_access_requestgitlab_group_hookgitlab_group_iterationgitlab_group_membergitlab_group_projectgitlab_group_push_rulegitlab_group_subgroupgitlab_group_variablegitlab_hookgitlab_instance_variablegitlab_issuegitlab_merge_requestgitlab_merge_request_changegitlab_my_eventgitlab_my_issuegitlab_my_projectgitlab_projectgitlab_project_access_requestgitlab_project_container_registrygitlab_project_deploymentgitlab_project_iterationgitlab_project_jobgitlab_project_membergitlab_project_pages_domaingitlab_project_pipelinegitlab_project_pipeline_detailgitlab_project_protected_branchgitlab_project_repositorygitlab_project_repository_filegitlab_project_variablegitlab_settinggitlab_snippetgitlab_usergitlab_user_eventgitlab_version
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 ismain
.
Examples
Obtain information about the README.md from a specific project
select *from gitlab_project_repository_filewhere project_id = 123 and file_path = 'README.md';
Obtain information from a file in a sub-folder
select *from gitlab_project_repository_filewhere project_id = 123 and file_path = 'folder/other_folder/file.ext';
Schema for gitlab_project_repository_file
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
blob_id | text | The blob ID of the file, can be used to obtain the blob | |
commit_id | text | The ID of the last commit which affected the file, can be used to pull the commit | |
content | text | The content of the file, encoded as per the encoded field | |
content_sha256 | text | The SHA256 hash of the file content | |
encoding | text | The encoding used on the Content field value | |
execute_filemode | boolean | Indicates if the file has execution permissions. | |
file_name | text | The name of the file | |
file_path | text | = | The path of the file |
project_id | bigint | = | The ID of the project this repository file belongs to - link `gitlab_project.id`. |
ref | text | = | The repository ref (tag, branch, etc) |
size | bigint | The size of the file |