Skip to content

Commit 3ceaa20

Browse files
committed
Update deployment preview
1 parent 76f816f commit 3ceaa20

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

web/src/gui/deployments/DeploymentPreview.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,24 @@ export const DeploymentPreview: FC<{
133133
</Link>
134134
<Link
135135
to={
136-
`https://github.com/${githubContext.data.commit.author.username}` as any
136+
`https://github.com/${githubContext.data.commit?.author.username}` as any
137137
}
138138
className="hover:text-link flex items-center gap-2 hover:underline"
139139
target="_blank"
140140
>
141-
<span>{githubContext.data.commit.author.name}</span>
141+
<span>{githubContext.data.commit?.author.name}</span>
142142
<img
143-
src={`https://github.com/${githubContext.data.commit.author.username}.png`}
143+
src={`https://github.com/${githubContext.data.commit?.author.username}.png`}
144144
className="size-6 rounded-sm"
145-
alt={githubContext.data.commit.author.name}
145+
alt={githubContext.data.commit?.author.name}
146146
/>
147147
</Link>
148-
{githubContext.data.commit.timestamp && (
148+
{githubContext.data.commit?.timestamp && (
149149
<div className="text-muted">
150150
<TimeAgo
151151
date={
152152
new Date(
153-
githubContext.data.commit.timestamp
153+
githubContext.data.commit?.timestamp
154154
)
155155
}
156156
formatOptions={{

web/src/gui/deployments/context/github.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export const GithubDeploymentContext: FC<{
136136
target="_blank"
137137
>
138138
<FiGitCommit />
139-
{decoratedContext.data.commit.id.slice(0, 7)}
139+
{decoratedContext.data.commit?.id.slice(0, 7)}
140140
</Link>
141141
</div>
142142
</div>
@@ -146,7 +146,7 @@ export const GithubDeploymentContext: FC<{
146146
</div>
147147
<div>
148148
<TimeAgo
149-
date={new Date(context.data.commit.timestamp)}
149+
date={new Date(context.data.commit?.timestamp)}
150150
/>
151151
</div>
152152
</div>
@@ -156,17 +156,17 @@ export const GithubDeploymentContext: FC<{
156156
<div className="text-muted">Created by</div>
157157
<Link
158158
to={
159-
`https://github.com/${context.data.commit.author.username}` as any
159+
`https://github.com/${context.data.commit?.author?.username}` as any
160160
}
161161
className="hover:text-link flex items-center gap-2 hover:underline"
162162
target="_blank"
163163
>
164164
<img
165-
src={`https://github.com/${context.data.commit.author.username}.png`}
165+
src={`https://github.com/${context.data.commit?.author?.username}.png`}
166166
className="size-6 rounded-md"
167-
alt={context.data.commit.author.name}
167+
alt={context.data.commit?.author?.name}
168168
/>
169-
{context.data.commit.author.name}
169+
{context.data.commit?.author?.name}
170170
</Link>
171171
</div>
172172
{decoratedContext.data.workflow_status && (

0 commit comments

Comments
 (0)