Merge pull request #4819 from kuangp/feat/actions/ghe

feat(github-actions-plugin): default links to GitHub host in app config if defined
This commit is contained in:
Ben Lambert
2021-03-08 17:51:39 +01:00
committed by GitHub
3 changed files with 11 additions and 2 deletions
+5
View File
@@ -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>