Quick Links to Your Git Repository

Updated 1 week ago by Copado Solutions

Copado provides quick links to your Git branches, commits, tags and pull requests in order to see relevant information in your Git repository provider's end.

The quick links View in Git or Pull Request can be found in the records of the following objects:

  • Git Snapshot (for branch).
  • Snapshot Commit (for commits).
  • User Story (for the feature branch if you are using Copado's Git flow).
  • User Story Commit (for commits).
  • Promotion (in the Deployments related list).

How to Use It

  1. Go to your Git Repository record.
  2. Select a Git provider from the options in the drop-down menu (Copado Version Control, GitHub, Bitbucket, Gitlab, Microsoft Team Service or Others).
    1. Choose the Others option if you are working with Bitbucket Server or any other Git service provider that is not listed in the menu.
    2. If you are using Azure, select Microsoft Team Service.
  3. Fill in the Branch Base URL, Commit Base URL, Pull Request Base URL, and Tag Base URL:
  • Copado Version Control:
    • Branch Base URL example: https://{Domain}.cvc.copado.com/{UserName}/{RepositoryName}/src/branch/
    • Commit Base URL example: https://{Domain}.cvc.copado.com/{UserName}/{RepositoryName}/commit/
    • Pull Request Base URL example: https://{Domain}.cvc.copado.com/{UserName}/{RepositoryName}/
    • Tag Base URL example: https://{Domain}.cvc.copado.com/{UserName}/{RepositoryName}/src/tag/
  • Github:
    • Branch Base URL example: https://github.com/{companyName}/{repositoryName}/tree/
    • Commit Base URL example: https://github.com/{companyName}/{repositoryName}/commits/
    • Pull Request Base URL example: https://github.com/{companyName}/{repositoryName}/
    • Tag Base URL example: https://github.com/{companyName}/{repositoryName}/tags/
  • Bitbucket:
    • Branch Base URL example: https://bitbucket.org/{companyName}/{repositoryName}/branch/
    • Commit Base URL example: https://bitbucket.org/{companyName}/{repositoryName}/commits/
    • Pull Request Base URL example: https://bitbucket.org/{companyName}/{repositoryName}/
    • Tag Base URL example: https://bitbucket.org/{companyName}/{repositoryName}/src/
  • Gitlab:
    • Branch Base URL example: https://gitlab.com/{companyName}/{repositoryName}/tree/
    • Commit Base URL example: https://gitlab.com/{companyName}/{repositoryName}/commit/
    • Pull Request Base URL example: https://gitlab.com/{companyName}/{repositoryName}/
    • Tag Base URL example: https://gitlab.com/{companyName}/{repositoryName}/tags/
  • Visual Studio:
    • Branch Base URL example: https://{companyName}.visualstudio.com/_git/{projectName}/tree/
    • Commit Base URL example: https://{companyName}.visualstudio.com/_git/{projectName}
    • Pull Request Base URL example: https://{companyName}.visualstudio.com/_git/{projectName}/
    • Tag Base URL example: https://{companyName}.visualstudio.com/_git/{projectName}/tags/
  • Azure:
    • Branch Base URL example: https://dev.azure.com/{organizationName}/{projectName}/_git/{repositoryName}?version=GB
    • Commit Base URL example: https://dev.azure.com/{organizationName}/{projectName}/_git/{repositoryName}/commit/
    • Pull Request Base URL example: https://dev.azure.com/{organizationName}/{projectName}/_git/{repositoryName}/
    • Tag Base URL example: https://dev.azure.com/{organizationName}/{projectName}/_git/{repositoryName}/tags

The example below shows the Git link setup for GithHub provider:

  1. Save the Git Repository record.
  2. Navigate to one of your Git snapshots and find the View in Git field with the name of the branch. This link redirects to the branch page in the Git repository:
  3. Navigate to one of the commits in your Git Snapshot record and find the View in Git field with the id of the commit. This link redirects to the corresponding commit page in the Git repository:
  4. The User Story Commits record also has a View in Git field that is conveniently located in the User Story Commits related list in the User Story layout:
  5. The Pull Requests button on any User Story that has commits allows you to see how the changes of an individual user story will affect the destination org when deployed.
    If you click on this button, you will be redirected to the pull request page in your Git repository. The pull request is populated with the user story's feature branch and the destination branch linked to the destination environment, as defined in the deployment flow:
  6. A Pull Requests link appears in any deployment located in the Deployments related list of a Promotion record in order to see how the deployment of the promotion will affect the metadata in the destination org.
    If you click on this link, you will be redirected to the pull request page in your Git repository. The pull request is populated with the promotion branch and the destination branch linked to the destination environment of the Promotion:

While most of the setup for Bitbucket on premise is the same as for any other repositories, the branch URLs need to follow a rather different structure.

When configuring your Git Repository record, if you want to connect to Bitbucket on premise, you need to select Others from the Git Provider drop-down menu. Then, fill in the URLs as follows:

  • Branch Base URL: https://git.{companyDomain}/{subdomain}/projects/{projectShortCut}/repos/{repositoryName}branches?base=
  • Commit Base URL: https://git.{companyDomain}/{subdomain}/projects/{projectShortCut}/repos/{repositoryName}/commits/
  • Pull Request Base URL: pull-requests?create=true&targetBranch=[TARGET_BRANCH_NAME]&sourceBranch=[SOURCE_BRANCH_NAME]
  • Tag Base URL: The Bitbucket server has different URLs based on source, commits or branch, so the tag URL will vary depending on where you want to navigate. This is the URL to navigate to the commits of a tag: https://git.{companyDomain}/{subdomain}/projects/{projectShortCut}/repos/{repositoryName}/commits/?until=MyTag

How did we do?