feat(github-actions-plugin): default links to GitHub host in app config if defined
Signed-off-by: Phil Kuang <pkuang@factset.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-github-actions': patch
|
||||
---
|
||||
|
||||
Link to GitHub using host defined in app config if defined.
|
||||
@@ -72,6 +72,8 @@ export const RecentWorkflowRunsCard = ({
|
||||
}
|
||||
}, [error, errorApi]);
|
||||
|
||||
const githubHost = hostname || 'github.com';
|
||||
|
||||
return !runs.length ? (
|
||||
<EmptyState
|
||||
missing="data"
|
||||
@@ -81,7 +83,7 @@ export const RecentWorkflowRunsCard = ({
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
href={`https://github.com/${owner}/${repo}/actions/new`}
|
||||
href={`https://${githubHost}/${owner}/${repo}/actions/new`}
|
||||
>
|
||||
Create new Workflow
|
||||
</Button>
|
||||
|
||||
@@ -191,6 +191,8 @@ export const WorkflowRunsTable = ({
|
||||
branch,
|
||||
});
|
||||
|
||||
const githubHost = hostname || 'github.com';
|
||||
|
||||
return !runs ? (
|
||||
<EmptyState
|
||||
missing="data"
|
||||
@@ -200,7 +202,7 @@ export const WorkflowRunsTable = ({
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
href={`https://github.com/${projectName}/actions/new`}
|
||||
href={`https://${githubHost}/${projectName}/actions/new`}
|
||||
>
|
||||
Create new Workflow
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user