Capturing issue or commit discussion comments in GitLab

You can capture issue comments or commit discussion comments in IBM® Engineering Workflow Management (EWM) work items when those GitLab comments have references to work items. For example, if a commit discussion or issue comment has the words defect 320, defect 380, then these comments are captured in those two defects.

Before you begin

Make sure that you have completed the tasks described in Configuring the basic integration with GitLab.

A shared user base, such as a common LDAP, between EWM and the GitLab/GitLab Enterprise server is optional. It is recommended to add an EWM functional user ID to the webhook configuration. Ensure that the functional user is authorized for Git requests.

About this task

In the issue or commit discussion comment, these keywords are recognized as work item references: workitem, bug, task, defect, and #.

You must configure a webhook for each GitLab Enterprise repository to commit discussions in work items.

Procedure

  1. In the web client, log on to the Change and Configuration Management. For example, go to https://host_name:9443/ccm/web.
  2. Click Source Control > Work with Git.
  3. Click Browse Registered Git Repositories.
  4. Select the repository that you registered.
  5. Expand the Host Server Configuration section.
  6. Ensure that the Hosting Server field is set to GitLab.
  7. In the Secret Key Authorization field, enter a secret. This secret is provided when you configure the webhook in GitLab.
  8. Optional: If GitLab and EWM do not share a user base, then a functional user is required. To use a functional user ID for a webhook URL, click Insert Functional User. Select the user and click OK.
  9. Click Save to persist the changes to the Git Repository Registration page in EWM.
  10. Copy the web hook URL.
  11. To add the webhook URL to the GitLab repository, follow the instructions in Web hooks.
  12. Under Trigger select Comments.
  13. In the Secret Token field, enter the value that you entered in the Secret Key Authorization field.
  14. Click Save to save the webhook configuration in GitLab.
  15. Optional: To disable replication of content from the issue or commit discussion in work items:
    1. In the web client, log on to Change and Configuration Management. For example, go to https://host_name:9443/ccm/web.
    2. On the CCM project page, click Source Control > Work with Git.
    3. Click Browse Registered Git Repositories.
    4. Select the repository that you registered.
    5. Expand the GitHub/GitLab Configuration section.
    6. Clear Replicate comments from commit or issue discussion.
    7. Click Save.