Link GitHub revisions to Tosca revisions

If you host your code on GitHub or on a custom GitHub Enterprise Server, you can link your Tosca repository to your GitHub repository. This allows you to link individual GitHub revisions to Tosca revisions when you make changes to your code.

Prerequisites

To connect to your GitHub repository, you must meet the following requirements:

  • You work in a multi-user environment.

  • You've enabled versioning integration as described on this page.

  • You've created a personal access token in Github that includes full control of private repositories.

  • You have a valid SSL/TLS certificate if you host your code on a GitHub Enterprise Server.

Enable Versioning Integration

Versioning integration allows you to work with different versioning systems in Tosca. To enable versioning integration, follow these steps:

  1. Start Tricentis Tosca.

  2. Go to Project->Options->Versioning Integration.

  3. Select Enabled and click OK.

  4. Restart Tosca for the changes to take effect.

Connect to the GitHub repository

To connect your GitHub repository to your Tosca repository, follow these steps:

  1. Make sure the Tosca project is checked out.

  2. Right-click the project root and select Connect to GitHub Repository from the context menu.

  1. In the subsequent dialog, enter the URL to your GitHub repository in this format: https://github.com/<github_username>/<projectname>.git. Click OK.

    Note that you can use https://github.com or any other custom GitHub Enterprise URL.

  1. Enter your GitHub Personal Access Token. Click OK.

  1. Select a GitHub branch from the dropdown menu. Click OK.

Select the GitHub branch

Once you've connected your GitHub repository, your project has two new properties:

  • VersioningBranch displays the name of the linked GitHub branch.

  • VersioningURL displays the URL to your GitHub repository.

New project properties in the Properties tab

Link GitHub revisions to your Tosca revisions

To link your Tosca Commander project status to the respective GitHub code status, go to the ribbon menu tab Home and click CheckIn all.

The revision dialog opens:

Opening the revision dialog

The revision dialog displays the following information:

Revision

The column Revision displays the GitHub revision number. To see the full number, hover over the number with your mouse.

Author

The column Author displays the name of the person who committed the code revision to GitHub.

Date

The column Date displays the date of the revision to GitHub.

Message

The column Message displays the GitHub commit message for this particular revision. To see the entire GitHub commit message, hover over the message with your mouse.

Previous GitHub Revision

Previous GitHub Revision displays the last GitHub revision the user has linked to their Tosca Commander test status.

If a user has never linked a revision before, Previous GitHub Revision displays a series of dashes.

New GitHub Revision

New GitHub Revision displays the proposed revision to connect to the user's Project status in Tosca Commander. By default, the system proposes the last GitHub revision the user has linked to.

To link to another revision, follow the steps below:

  1. Enable the checkbox next to the respective revision. Once you have selected another revision, New GitHub Revision displays the new revision number.

    You can search for revisions in one of two ways:

    • By filtering the list. To find a specific Revision, Author or Message, enter the respective number, name or keyword into the filter field. Click the icon.

    • By scrolling through the list. To display the next ten revisions or the previous ten revisions, click the buttons Next 10 and Previous 10, respectively.

  2. Enter a Tosca commit message into the comment field.

    To add comments into a multi-user repository the setting EnableCheckInComments has to be enabled.

  1. Click Checkin. The commit is listed in the Change History for Project window.

    To see your change history, go to the ribbon menu Versioning tab and click View Change History for Project.

Added commit message in the Change History