Skip to content

Conversation

@tdruez
Copy link
Contributor

@tdruez tdruez commented Jul 31, 2025

Issue: #346

Implementation

Built on the foundations implemented for the GitHub integration in #362

Documentation

https://dejacode.readthedocs.io/en/latest/integrations-gitlab.html

Changes

  • Add a gitlab_token field Dataspace configuration model.
  • The integration code exists as the GitLabIntegration class.
  • The common integration code was refactored as the BaseIntegration class for re-usability.
  • Add support for posting comments from the DejaCode Request to the GitLab Issue.
  • Add DejaCode URL in the GitLab Issue body.
  • The undefined fields, such as "Product context", are not part of the Issue body.
  • Closing a Request on the DejaCode side posts a comment including the reason in the GitLab Issue.
  • Add full test suite for the GitLab integration.

Quickstart

Prerequisites

  • A GitLab project that you want to integrate with DejaCode.
  • A GitLab user account with sufficient permissions to create and manage issues in the target project.

DejaCode configuration

  1. Set your gitlab_token on your Dataspace configuration.
  2. Create a new RequestTemplate in your Dataspace and use your GitLab project URL as the Issue Tracker ID, e.g.: https://gitlab.com/group/project_name
  3. From now on, any new DejaCode Request using this template will be pushed to the GitLab-provided project. Edits such as field updates, comments, and closing the Request are also propagated to the GitLab Issue.

Refer to https://dejacode.readthedocs.io/en/latest/integrations-gitlab.html for detailed instructions.

tdruez added 8 commits July 30, 2025 17:27
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
@DennisClark
Copy link
Member

@tdruez Using the documentation, even though I have no significant GitLab experience, I was able to configure the integration and run a successful test. See https://gitlab.com/dennismclark-group/dennismclark-project/-/issues/1

I created a new user in GitLab, a new project, and a new API token following the directions in the documentation. I set the API token in DejaCode staging, updated one of the workflow request templates with the project URL, and created a new Request, which generated an Issue in the GitLab project successfully. I closed the Request in DejaCode with a comment, and both the status update and the comment insert were successfully sent to GitLab.

No problems found. I am sure that someone more familiar with the GitLab UI and functionality would find it even easier to configure and use.

Signed-off-by: tdruez <tdruez@nexb.com>
@tdruez tdruez merged commit 4851d28 into main Aug 1, 2025
4 checks passed
@tdruez tdruez deleted the 346-gitlab-integration branch August 1, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants