Skip to main content
Version: Next

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

ParameterTypeDescription
configHarnessIntegrationConfigThe relevant provider config
urlstringA 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