Skip to main content

getHarnessLatestCommitUrl()

Home > @backstage/integration > getHarnessLatestCommitUrl

Given a URL pointing to a repository branch, returns a URL for latest commit information.

Signature:

function getHarnessLatestCommitUrl(config: HarnessIntegrationConfig, url: string): string;

Parameters

Parameter

Type

Description

config

HarnessIntegrationConfig

The relevant provider config

url

string

A URL pointing to a repository branch

**Returns:**

string

Remarks

Converts from: https://app.harness.io/ng/account/accountId/module/code/orgs/orgName/projects/projectName/repos/repoName/files/branchName to: https://app.harness.io/gateway/code/api/v1/repos/accountId/orgName/projectName/repoName/+/content?routingId=accountId&include\_commit=true&git\_ref=refs/heads/branchName