From 13fb84244ba5b9eb1ea4fcadfc6fcfb68701da55 Mon Sep 17 00:00:00 2001 From: Phil Kuang Date: Thu, 4 Mar 2021 14:24:05 -0500 Subject: [PATCH] feat(github-actions-plugin): default links to GitHub host in app config if defined Signed-off-by: Phil Kuang --- .changeset/beige-cobras-camp.md | 5 +++++ .../src/components/Cards/RecentWorkflowRunsCard.tsx | 4 +++- .../src/components/WorkflowRunsTable/WorkflowRunsTable.tsx | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/beige-cobras-camp.md diff --git a/.changeset/beige-cobras-camp.md b/.changeset/beige-cobras-camp.md new file mode 100644 index 0000000000..56345db805 --- /dev/null +++ b/.changeset/beige-cobras-camp.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-github-actions': patch +--- + +Link to GitHub using host defined in app config if defined. diff --git a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx index 30807482a4..1126c2a2a0 100644 --- a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx +++ b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx @@ -72,6 +72,8 @@ export const RecentWorkflowRunsCard = ({ } }, [error, errorApi]); + const githubHost = hostname || 'github.com'; + return !runs.length ? ( Create new Workflow diff --git a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index e62704405d..82f7d64484 100644 --- a/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/github-actions/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -191,6 +191,8 @@ export const WorkflowRunsTable = ({ branch, }); + const githubHost = hostname || 'github.com'; + return !runs ? ( Create new Workflow