fix: enable support for edit_url in TechDocs
Signed-off-by: Calvin Lee <cjlee@ualberta.ca>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-node': patch
|
||||
---
|
||||
|
||||
Updated getRepoUrlFromLocationAnnotation to check for harness scm integration
|
||||
@@ -101,11 +101,13 @@ export const getRepoUrlFromLocationAnnotation = (
|
||||
if (locationType === 'url') {
|
||||
const integration = scmIntegrations.byUrl(target);
|
||||
|
||||
// We only support it for github, gitlab and bitbucketServer for now as the edit_uri
|
||||
// We only support it for github, gitlab, bitbucketServer and harness for now as the edit_uri
|
||||
// is not properly supported for others yet.
|
||||
if (
|
||||
integration &&
|
||||
['github', 'gitlab', 'bitbucketServer'].includes(integration.type)
|
||||
['github', 'gitlab', 'bitbucketServer', 'harness'].includes(
|
||||
integration.type,
|
||||
)
|
||||
) {
|
||||
// handle the case where a user manually writes url:https://github.com/backstage/backstage i.e. without /blob/...
|
||||
const { filepathtype } = gitUrlParse(target);
|
||||
|
||||
Reference in New Issue
Block a user