steampipe plugin install theapsgroup/gitlab

Table: gitlab_commit

A commit is a change-set to the code.

The gitlab_commit table can be used to query information about any commit.

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

Examples

List commits

select
*
from
gitlab_commit
where
project_id = 1;

List commits (by newest first)

select
*
from
gitlab_commit
where
project_id = 1
order by
created_at desc;

Obtain an individual commit

select
*
from
gitlab_commit
where
project_id = 1
and id = '73012177d1c8eb765bfd952ccfc50c679f147d12';

Contributions by author

select
author_email,
count(*)
from
gitlab_commit
where
project_id = 1
group by
author_email
order by
count desc;

Schema for gitlab_commit

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
author_emailtextThe email of the commit author.
author_nametextThe name of the commit author.
authored_datetimestamp with time zoneTimestamp of commit.
commit_additionsbigintNumber of additions made in the commit
commit_deletionsbigintNumber of deletions made in the commit
commit_total_changesbigintTotal number of changes made in the commit
committed_datetimestamp with time zoneTimestamp of the commit.
committer_emailtextThe email address of the committer.
committer_nametextThe name of the committer.
created_attimestamp with time zoneTimestamp of the creation of commit.
idtext=The ID (commit hash) of the commit.
messagetextThe commit message.
parent_idsjsonbArray of parent commit hashes.
pipeline_createdtimestamp with time zoneTimestamp indicating when the last pipeline instance was created.
pipeline_idbigintIdentifier for the last pipeline instance triggered against the commit
pipeline_reftextThe ref that the pipeline was run against
pipeline_shatextThe SHA of the commit the last pipeline instance was run against
pipeline_sourcetextSource associated with the pipeline instance
pipeline_statustextStatus of the last pipeline instance triggered against the commit
pipeline_updatedtimestamp with time zoneTimestamp indicating when the last pipeline instance was updated.
pipeline_urltextThe URL of the pipeline in the web interface
project_idbigint=The ID of the project containing the commit - link to `gitlab_project.ID`
short_idtextThe short ID (short commit hash) of the commit.
statustextBuild state of the commit
titletextThe title of the commit.
web_urltextThe url of the commit.