Capturing commit discussions in GitLab

You can capture entire commit discussions in IBM® Engineering Workflow Management (EWM) work items that are referenced in a Git commit comment. For example, if the Git commit comment is Fix for defect 320 and a discussion occurs about this commit in GitLab, then each discussion comment is captured in defect 320.

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 commit message, 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 GitHub/GitLab 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 and Issues.
  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 the 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.

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki