api

package
v1.87.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeTypeGroup   = "group"
	ScopeTypeProject = "project"
)

scope type constants

Variables

This section is empty.

Functions

func FetchWorkItems

func FetchWorkItems(ctx context.Context, client *gitlab.Client, scope *ScopeInfo, types []string, state string, after string, perPage int64) ([]WorkItem, *PageInfo, error)

FetchWorkItems retrieves all work items using cursor-based pagination

Types

type GroupWorkItems

type GroupWorkItems struct {
	WorkItems WorkItemsConnection `json:"workItems"`
}

helper structs for GraphQL response parsing

type PageInfo

type PageInfo struct {
	EndCursor   string `json:"endCursor"`
	HasNextPage bool   `json:"hasNextPage"`
}

type ProjectWorkItems

type ProjectWorkItems struct {
	WorkItems WorkItemsConnection `json:"workItems"`
}

type ScopeInfo

type ScopeInfo struct {
	Type string
	Path string
}

ScopeInfo contains detected scope information for work items queries

type WorkItem

type WorkItem struct {
	IID          string `json:"iid"`
	Title        string `json:"title"`
	State        string `json:"state"`
	WorkItemType struct {
		Name string `json:"name"`
	} `json:"workItemType"`
	Author struct {
		Username string `json:"username"`
	} `json:"author"`
	WebURL string `json:"webUrl"`
}

WorkItem represents a work item from the GraphQL API

type WorkItemsConnection

type WorkItemsConnection struct {
	Nodes    []WorkItem `json:"nodes"`
	PageInfo PageInfo   `json:"pageInfo"`
}

type WorkItemsResponse

type WorkItemsResponse struct {
	Data struct {
		Group   *GroupWorkItems   `json:"group,omitempty"`
		Project *ProjectWorkItems `json:"project,omitempty"`
	} `json:"data"`
}

WorkItemsResponse represents the GraphQL response structure for work items queries

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL