added changes

Signed-off-by: npiyush97 <npiyush35@gmail.com>
This commit is contained in:
npiyush97
2024-05-13 22:44:00 +05:30
parent 4668dc76c9
commit 81a215d3e6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/plugin-catalog-backend': patch
---
Added a regex test to check commit hash.If url is from git commit branch ignore the edit url.
Added a regex test to check commit hash. If url is from git commit branch ignore the edit url.
@@ -31,6 +31,7 @@ import {
CatalogProcessorEmit,
} from '@backstage/plugin-catalog-node';
const commitHashRegExp = /\b[0-9a-f]{40,}\b/;
/** @public */
export class AnnotateLocationEntityProcessor implements CatalogProcessor {
constructor(
@@ -53,7 +54,6 @@ export class AnnotateLocationEntityProcessor implements CatalogProcessor {
let viewUrl;
let editUrl;
let sourceLocation;
const commitHashRegExp = /\b[0-9a-f]{40,}\b/;
if (location.type === 'url') {
const scmIntegration = integrations.byUrl(location.target);