Expand description
GitLab REST and GraphQL API client for issues and work items.
Structs§
- Assignee
- A GitLab user (assignee).
- Client
- Client for the GitLab REST API v4.
- Event
- One entry from the user-activity events endpoint. Fields are
sparse — GitLab only populates the ones relevant to each
action_name. - Event
Note - Note payload attached to
commented onevents. - Event
Push Data - Push payload attached to
pushed to/pushed newevents. - Group
Client - Client for group-level GitLab API queries.
- Group
Project - A project name returned by the GitLab group projects API.
- Issue
- A GitLab issue.
- Issue
Update - Parameters for editing an issue.
- Merge
Request - A GitLab merge request (minimal fields).
- Project
Summary - Minimal project identity: what you need to filter events by
path_with_namespaceprefix and render a human-readable link. - Release
- A GitLab Release as returned by
/projects/:id/releases. Field selection follows the API’s snake_case names. - Release
Author - Author block on a Release. Username is the field most useful for cross-referencing with the calling user’s profile.
- Release
Links _linksblock. Theselflink is the canonical web URL of the release page.- Tag
- A tag as returned by
/projects/:id/repository/tags. The fields kept here are the ones relevant to an activity-window match: the tag’screated_at(when the ref was pushed, distinct from the commit date) and the tag name. - User
- A GitLab user as returned by
/users?username=<name>.
Functions§
- count_
authored_ commits - Count commits in
project_idauthored byauthorwithin[since, until](inclusive). GitLab’s commits endpoint matches theauthorparameter against both name and email fields, so passing the GitLab username usually works; if the user authored commits under an email only, pass that email string instead. - list_
archived_ project_ names - List the archived projects under a GitLab group, returning
their names. GitLab’s
archived=truefilter narrows the listing server-side, so this is a cheap separate query rather than enriching every project in the main listing. - list_
group_ projects - List all projects under a GitLab group (public, no auth needed).
- list_
tags - List tags for a project, paginated. Returns an empty list on
404. Uses
order_by=updated&sort=descso newer tags come first — handy when the caller wants to short-circuit on the first tag older than its window of interest. - package_
from_ issue_ url - Extract the package name from a GitLab issue or work item web_url.
- parse_
issue_ url - Parse a GitLab issue / work-item URL into its components.
- parse_
mr_ url - Parse a merge request URL into its components.
- parse_
project_ url - Parse a GitLab project URL into (base_url, project_path).
- project_
path_ from_ issue_ url - Extract the project path from a GitLab issue or work item web_url.
- project_
releases - List releases for a project. Returns an empty list on 404 (project gone) so callers can iterate over many projects without per-project error handling.
- project_
summary - Look up a project’s
path_with_namespacefrom its numeric ID. Used to map eventproject_id→ group-prefix filter. - user_
by_ username - Look up a user by username on a specific GitLab instance.
Returns
Ok(None)if the server returns 200 with an empty list (no user with that name on that instance). - user_
events - Fetch a user’s activity events within
[after, before)— GitLab’s event endpoint is half-open on both sides and rejects both-null. Results are paginated at 100/page; this follows every page until a short page arrives. - validate_
token - Check whether a token is valid by calling
GET /api/v4/user.