diff --git a/.changeset/tall-planes-grow.md b/.changeset/tall-planes-grow.md
new file mode 100644
index 0000000000000..d5e07256c9077
--- /dev/null
+++ b/.changeset/tall-planes-grow.md
@@ -0,0 +1,5 @@
+---
+'@backstage/plugin-github-actions': patch
+---
+
+Fixed an issue where an error message was being displayed on the initial component render. This was due to values owner/repo not yet being set.
diff --git a/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx b/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx
index aebf7dfa01278..d1930bf5dda1c 100644
--- a/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx
+++ b/plugins/github-actions/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx
@@ -175,14 +175,17 @@ export const WorkflowRunDetails = ({ entity }: { entity: Entity }) => {
const jobs = useWorkflowRunJobs({ hostname, owner, repo });
const error = projectName.error || (projectName.value && details.error);
+ const loading = projectName.loading || details.loading || !details.value;
+
const classes = useStyles();
- if (error) {
+
+ if (error && error.message) {
return (
Failed to load build, {error.message}
);
- } else if (projectName.loading || details.loading) {
+ } else if (loading) {
return ;
}
return (