steampipe plugin install theapsgroup/gitlab

Table: gitlab_issue

Issues are used to track bugs, feature requests, tasks, etc on GitLab.

The gitlab_issue table can be used to query information against all issues in the GitLab instance.

Note: When used with the Public GitLab you must specify an = qualifier for at least one of the following fields.

  • assignee
  • assignee_id
  • author_id
  • project_id

This is to prevent attempting to return ALL public issues which would result in an error.

Examples

Obtain all issues

select
*
from
gitlab_issue;

Obtain a list of Confidential Issues

select
*
from
gitlab_issue
where
confidential = true;

Obtain counts of issues by state

select
state count(*) as quantity
from
gitlab_issue
group by
state

Get all issues for your projects

select
p.name as project_name,
p.id as project_id,
i.title as issue_title,
i.id as issue_id,
i.description as description,
i.state as state
from
gitlab_my_project as p,
gitlab_issue as i
where
p.id = i.project_id

Schema for gitlab_issue

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
assigneetext=The username of the user assigned to the issue - link to `gitlab_user.username`
assignee_idbigint=The ID of the user assigned to the issue - link to `gitlab_user.id`.
assigneesjsonbAn array of assigned usernames, for when more than one user is assigned.
authortextThe username of the author - link to `gitlab_user.username`.
author_idbigint=The ID of the author - link to `gitlab_user.id`.
author_nametextThe display name of the author
closed_attimestamp with time zoneTimestamp of when issue was closed. (null if not closed).
closed_bytextThe username of the user whom closed the issue - link to `gitlab_user.username`.
closed_by_idbigintThe ID of the user whom closed the issue - link to `gitlab_user.id`.
confidentialboolean=Indicates if the issue is marked as confidential.
created_attimestamp with time zoneTimestamp of issue creation.
descriptiontextThe description of the Issue.
discussion_lockedbooleanIndicates if the issue has the discussions locked against new input.
downvotesbigintCount of down-votes received on the issue.
due_datetimestamp with time zoneTimestamp of due date for the issue to be completed by.
epic_group_idbigintThe group ID of the associated epic.
epic_idbigintThe ID of the associated epic.
epic_iidbigintThe IID of the associated epic.
epic_issue_idbigintEpic issue id.
epic_titletextTitle of the associated epic.
epic_urltextThe url of the associated epic.
external_idtextThe external ID of the issue.
full_reftextFull reference of the issue.
idbigintThe ID of the Issue.
iidbigintThe instance ID of the Issue.
issue_link_idbigintIssue link id.
issue_typetextThe type of issue.
labelsjsonbAn array of strings for the textual labels applied to the issue.
merge_requests_countbigintCount of merge requests associated with the issue.
milestone_created_attimestamp with time zoneTimestamp at which the milestone was created.
milestone_descriptiontextThe description of the milestone.
milestone_due_datetimestamp with time zoneTimestamp of due date for the milestone to be completed by.
milestone_expiredbooleanIndicates if the milestone is expired.
milestone_idbigintThe ID of the milestone the issues is placed into.
milestone_iidbigintThe instance id of the milestone
milestone_start_datetimestamp with time zoneTimestamp of when the milestone was started.
milestone_statetextThe current state of the milestone.
milestone_titletextThe title of the milestone.
milestone_updated_attimestamp with time zoneTimestamp at which the milestone was updated.
project_idbigint=The ID of the project - link to `gitlab_project.id`.
rel_reftextRelative reference of the issue.
short_reftextShort reference of the issue.
statetextThe state of the Issue (opened, closed, etc).
subscribedbooleanIndicates if current user is subscribed to the issue.
time_estimatebigintTime estimated against the issue.
titletextThe title of the Issue.
total_time_spentbigintTotal time spent on the issue.
updated_attimestamp with time zoneTimestamp of last update to the issue.
upvotesbigintCount of up-votes received on the issue.
user_notes_countbigintCount of user notes on the issue.
web_urltextThe url to access the issue.
weightbigintThe weight assigned to the issue.