diff --git a/plugins/github-actions/dev/index.tsx b/plugins/github-actions/dev/index.tsx index 93e6ee4f74..153478ddbc 100644 --- a/plugins/github-actions/dev/index.tsx +++ b/plugins/github-actions/dev/index.tsx @@ -33,6 +33,8 @@ const mockEntity: Entity = { description: 'backstage.io', annotations: { 'github.com/project-slug': 'backstage/backstage', + 'backstage.io/source-location': + 'url:https://ghes.acme.co/backstage/backstage/tree/master/', }, }, spec: { diff --git a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx index f55cad8424..dcafc3b6f2 100644 --- a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx +++ b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx @@ -48,6 +48,8 @@ describe('', () => { name: 'software', annotations: { 'github.com/project-slug': 'theorg/the-service', + 'backstage.io/source-location': + 'url:https://ghes.acme.co/theorg/the-service/tree/main/', }, }, spec: { @@ -119,10 +121,14 @@ describe('', () => { ); }); - it('uses the github repo and owner from the entity annotation', async () => { + it('uses the github hostname, repo and owner from the entity annotations', async () => { renderSubject(); expect(useWorkflowRuns).toHaveBeenCalledWith( - expect.objectContaining({ owner: 'theorg', repo: 'the-service' }), + expect.objectContaining({ + hostname: 'ghes.acme.co', + owner: 'theorg', + repo: 'the-service', + }), ); });