Linking Node.js commits to work items
After you configure the integration, you can link Git commits to IBM® Engineering Workflow Management (EWM) work items.
Before you begin
- Your user ID is the same in Node.js and Engineering Workflow Management (EWM). If your user ID is different, then ensure that webhook is configured with a functional user.
- Create a work item in EWM project area in which the Node.js repository is registered.
- Create one or more files in the Node.js repository and commit them.
- The basic integration with Node.js is complete and post-receive hooks are configured for traceability by a Node.js or EWM administrator.
- The Node.js repository URL is https://localhost/DemoOrganization/DemoRepository
- The EWM project area in which Node.js repository is registered is https://localhost:9443/JKE%20Banking%20(Change%20Management)
- The EWM work item URL is https://localhost:9443/JKE%20Banking%20(Change%20Management)#action=com.ibm.team.workitem.viewWorkItem&id=100
About this task
The work item references are extracted from the commit message (when the commits are pushed). The work item references use a specific format: the comment contains certain keywords followed by the work item numbers. The format is keyword wi-num.
The supported keywords are task, defect, bug, rtcwi, work item, and workitem. The following examples are text fragments that are valid work item references when they occur in commit messages:
resolve bug 123
Clone the Node.js repository by using the Git command line utility.
Git clone <node.js repository url>
- Modify the file and stage it.
Git add .
- Commit the changes.
- In the commit message editor, add the following text:
Committing for work item 100.Note:
This comment will be visible in the work item linked to this commit. For more information, see the section on validating the link.
- Exit the editor.
- Push the changes to the branch.
Git pushThe work item is updated with a link to the Git commit. For more information about linking commits to work items, see Associating work items with commits.