InTouch Hub · Blue Isle Software

GitLab

Read GitLab projects, issues, and merge requests, and open new issues via the GitLab REST API (v4).

gitlabissuesmerge-requestsdevops

GitLab

Read GitLab projects, issues, and merge requests — and open new issues — via the GitLab REST API v4. Pure standard-library Python (urllib), no dependencies, credential-free (token passed as an input).

What it does

Branches on operation and calls the corresponding documented GitLab endpoint, authenticating with the PRIVATE-TOKEN header. The raw JSON response body is returned as result, and the HTTP status as status.

Operations

operation Method & endpoint Required inputs
list-projects GET /projects?membership=true
list-issues GET /projects/{projectId}/issues projectId
create-issue POST /projects/{projectId}/issues projectId, title
list-merge-requests GET /projects/{projectId}/merge_requests projectId

projectId is the numeric project ID or the URL-encoded path (e.g. mygroup/myproject — the tool URL-encodes it for you). state filters list-issues (opened/closed/all) and list-merge-requests (opened/closed/merged/all); it defaults to opened. search narrows list-projects. Self-managed GitLab? Set baseUrl to your instance's https://<host>/api/v4.

API key setup

  1. Go to GitLab → User Settings → Access Tokens (https://gitlab.com/-/user_settings/personal_access_tokens).
  2. Create a personal access token. Select the api scope (full read/write), or read_api if you only need the read operations.
  3. Copy the token and pass it as the apiKey input. It is sent as the PRIVATE-TOKEN HTTP header on every request.

Examples

List open issues in a project:

{
  "apiKey": "glpat-xxxxxxxxxxxxxxxxxxxx",
  "operation": "list-issues",
  "projectId": "mygroup/myproject",
  "state": "opened"
}

Open a new issue:

{
  "apiKey": "glpat-xxxxxxxxxxxxxxxxxxxx",
  "operation": "create-issue",
  "projectId": "12345",
  "title": "Login page returns 500 on submit",
  "description": "Steps to reproduce...",
  "labels": "bug,backend"
}