ByteChef LogoByteChef

GitLab

GitLab is a web-based DevOps lifecycle tool that provides a Git repository manager, CI/CD pipelines, issue tracking, and more in a single application.

Categories: Developer Tools

Type: gitlab/v1


Connections

Version: 1

OAuth2 Authorization Code

Properties

NameLabelTypeDescriptionRequired
clientIdClient IdSTRINGtrue
clientSecretClient SecretSTRINGtrue

Connection Setup

  1. Login to your GitLab account.
  2. Click on your profile icon in the top right corner and select Edit profile.
  3. On the left sidebar, select Applications.
  4. Click on Add new application.
  5. Fill in the required fields:
    • Name: Enter a name for your application (e.g., Test App).
    • Redirect URI: Specify the URI where users will be redirected after authorization (e.g., http://127.0.0.1:5173/callback).
  6. Select OAuth 2 Scopes. For the ByteChef connector, enable: api.
  7. Click on Save application.
  8. Copy the Application ID as Client ID and Secret as Client Secret and use it in ByteChef.

Actions

Create Comment on Issue

Name: createCommentOnIssue

Adds a comment to the specified issue.

Properties

NameLabelTypeDescriptionRequired
projectIdProject IDSTRINGtrue
issueIdIssue IDINTEGER
Depends On projectId
ID of the issue to comment on.true
bodyCommentSTRINGThe comment to add to the issue.true

Example JSON Structure

{
  "label" : "Create Comment on Issue",
  "name" : "createCommentOnIssue",
  "parameters" : {
    "projectId" : "",
    "issueId" : 1,
    "body" : ""
  },
  "type" : "gitlab/v1/createCommentOnIssue"
}

Output

Type: OBJECT

Properties

NameTypeDescription
idINTEGERThe ID of the comment.
bodySTRINGThe body of the comment.

Output Example

{
  "id" : 1,
  "body" : ""
}

Find Project ID and Issue ID

To find the Project ID, click here.

To find the Issue ID, click here.

Create Issue

Name: createIssue

Creates a new project issue.

Properties

NameLabelTypeDescriptionRequired
projectIdProject IDSTRINGID of the project where new issue will be created.true
titleTitleSTRINGThe title of an issue.true
descriptionDescriptionSTRINGThe description of an issue.false

Example JSON Structure

{
  "label" : "Create Issue",
  "name" : "createIssue",
  "parameters" : {
    "projectId" : "",
    "title" : "",
    "description" : ""
  },
  "type" : "gitlab/v1/createIssue"
}

Output

Type: OBJECT

Properties

NameTypeDescription
idINTEGERThe ID of the issue.
iidINTEGERThe internal ID of the issue.
project_idINTEGERThe ID of the project.
titleSTRINGThe title of the issue.
descriptionSTRINGThe description of the issue.
web_urlSTRINGThe URL of the issue.

Output Example

{
  "id" : 1,
  "iid" : 1,
  "project_id" : 1,
  "title" : "",
  "description" : "",
  "web_url" : ""
}

Find Project ID

To find the Project ID, click here.

Triggers

New Issue

Name: newIssue

Triggers when a new issue is created.

Type: DYNAMIC_WEBHOOK

Properties

NameLabelTypeDescriptionRequired
projectIdProjectSTRINGtrue

Output

Type: OBJECT

Properties

NameTypeDescription
descriptionSTRINGThe description of the issue.
idINTEGERThe ID of the issue.
iidINTEGERThe internal ID of the issue.
projectIdINTEGERThe ID of the project.
titleSTRINGThe title of the issue.

JSON Example

{
  "label" : "New Issue",
  "name" : "newIssue",
  "parameters" : {
    "projectId" : ""
  },
  "type" : "gitlab/v1/newIssue"
}

Find Project ID

To find the Project ID, click here.

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find the Project ID

The Project ID is a unique numeric value that can be found in the Gitlab UI or via the API.

  • Method 1: Via API

Use the GET /projects endpoint to retrieve a list of all projects and their numeric IDs.

  • Method 2: In the Gitlab UI
  1. On the top bar, select Search or go to and find your project.
  2. On the project overview page, in the upper-right corner, select Actions ( ).
  3. Select Copy project ID.

How to find the Issue ID

The Issue ID is a project-scoped identifier for an issue that can be found in the Gitlab UI or via the API.

  • Method 1: Via API

Use the GET /projects/PROJECT_ID/issues endpoint. List issues within a project to retrieve their IDs.

  • Method 2: In the Gitlab UI
  1. On the top bar, select Search or go to and find your project.
  2. On the left bar, click on Issues.
  3. Open the issue in your project.
  4. The Issue ID appears after the # symbol above the issue title.

How is this guide?

Last updated on

On this page