Share this page

# Set up your SCM system

If your CI server is set up to work with a Source Control Management (SCM) system, such as Git or Subversion (SVN), ALM Octane can help you track committed changes. For details, see Track changes committed to your Source Control Management system.

This topic explains how to customize SCM-related functionality.

In this topic:

## Enable linking to your repository viewer (Git or SVN only)

For each file displayed in the list of changed files, ALM Octane can provide links to the file view and diff view in your repository viewer. To enable this, configure templates for the HTTP links.

This functionality is provided for repository viewers whose HTTP link templates include the file path and the revision.

To configure templates for links to your repository viewer:

1. In Settings > Spaces, select the workspace that is set up to integrate with your CI server.

2. Click the DevOps tab. On the left side of the pane, select SCM Repositories.

   This page lists any Git and SVN repositories that integrate with your CI servers.

   Note: A repository is only displayed in this list after a pipeline run includes commits to the repository.

3. For each repository (each row in the grid) enter the following:

   • File link template. A template for the HTTP link to the file view of a selected file.

   • Diff link template. A template for the HTTP link to the diff view of a selected file version.

   • File in branch link template. A template for the HTTP link to the branch view, or the selected file in the branch.

   The file and diff templates must include the placeholders `{filePath}` or `{revision}`. The branch template should include `{branchName}`, and should also include `{filePath}` in order to link the selected file in the branch. ALM Octane replaces these with the relevant file's path, revision, and branch when creating the links.

Back to top

## Examples of link templates

The following are examples of templates for the available repository viewers.

Bitbucket:

- File link template: `<REPOSITORY_URL>/browse/{filePath}?until={revision}&untilPath={filePath}`

- Diff link template: `<REPOSITORY_URL>/commits/{revision}#{filePath}`

- Branch template: `<REPOSITORY_URL>/browse/{filePath}?at={branchName}`

Gitlab and Github:

- File link template: `<REPOSITORY_URL>/blob/{revision}/{filePath}`

- Diff link template: `<REPOSITORY_URL>/commit/{revision}#{filePath}`

- Branch template: `{repoUrl}/tree/{branchName}/{filePath}`

Azure:

- File link template: `<REPOSITORY_URL>?path={filePath}&_a=contents&{revision}`

- Diff link template: `<REPOSITORY_URL>/commit/{revision}?refName={branchName}&path={filePath}`

- Branch template: `{repoUrl}?version=GB{branchName}/{​​​​​​filePath}`

Back to top

## Customize SCM change patterns

You can use message patterns in your branches, commits, and pull requests to associate them with ALM Octane entities.

If the specified pattern appears either in a branch name, commit message, or in the title or description of a pull request, the branch, commit, or pull request will be associated with the corresponding entity in ALM Octane.

To modify default message patterns or define new patterns using Java regular expressions:

1. In Settings > Spaces, select the workspace that is set up to integrate with your CI server.

2. Click the DevOps tab. On the left side of the pane, select SCM Change Patterns.

3. Define the message patterns to use for associating branches, commits, and pull requests with ALM Octane entities.

   - Commits can be associated with user stories, quality stories, and defects.

   - Branches and pull requests can be associated with the above entities, and with features.

   Change an existing pattern, or click + to add a new pattern. Using Java regular expressions, design a pattern that contains a single capturing group containing the story ID.

   For example, the default pattern `defect\s*#(\d+)` represents the string `defect<any number of spaces>#<defect id>`.

   The patterns are not case sensitive.

4. Click Validate pattern in the toolbar, to experiment with your patterns and make sure that they match the string that you had in mind.

   For example, in the Validate Pattern dialog box, enter an experimental commit message. Click Validate to see the stories that your commit patterns associate with this comment.

   Repeat this step to test all of the patterns you defined.

   Example: This commit message includes the string `user story #4`. Therefore, it matches the pattern for user stories:

5. Make sure to tell your SCM users about the patterns their branch names, commit messages, and pull requests must follow, in order to be associated in ALM Octane with their corresponding entities.

Back to top

See also:

- Set up CI servers
- Assign roles and permissions
- Create and manage test assignment rules
- Track changes committed to your Source Control Management system

https://admhelp.microfocus.com ALM Octane 8942
Tips to improve your search results... ValueEdge & ALM Octane Help Center ValueEdge ALM Octane Help 16.0.100-16.0.400 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: