File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -133,24 +133,24 @@ export const DeploymentPreview: FC<{
133
133
</ Link >
134
134
< Link
135
135
to = {
136
- `https://github.com/${ githubContext . data . commit . author . username } ` as any
136
+ `https://github.com/${ githubContext . data . commit ? .author . username } ` as any
137
137
}
138
138
className = "hover:text-link flex items-center gap-2 hover:underline"
139
139
target = "_blank"
140
140
>
141
- < span > { githubContext . data . commit . author . name } </ span >
141
+ < span > { githubContext . data . commit ? .author . name } </ span >
142
142
< img
143
- src = { `https://github.com/${ githubContext . data . commit . author . username } .png` }
143
+ src = { `https://github.com/${ githubContext . data . commit ? .author . username } .png` }
144
144
className = "size-6 rounded-sm"
145
- alt = { githubContext . data . commit . author . name }
145
+ alt = { githubContext . data . commit ? .author . name }
146
146
/>
147
147
</ Link >
148
- { githubContext . data . commit . timestamp && (
148
+ { githubContext . data . commit ? .timestamp && (
149
149
< div className = "text-muted" >
150
150
< TimeAgo
151
151
date = {
152
152
new Date (
153
- githubContext . data . commit . timestamp
153
+ githubContext . data . commit ? .timestamp
154
154
)
155
155
}
156
156
formatOptions = { {
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export const GithubDeploymentContext: FC<{
136
136
target = "_blank"
137
137
>
138
138
< FiGitCommit />
139
- { decoratedContext . data . commit . id . slice ( 0 , 7 ) }
139
+ { decoratedContext . data . commit ? .id . slice ( 0 , 7 ) }
140
140
</ Link >
141
141
</ div >
142
142
</ div >
@@ -146,7 +146,7 @@ export const GithubDeploymentContext: FC<{
146
146
</ div >
147
147
< div >
148
148
< TimeAgo
149
- date = { new Date ( context . data . commit . timestamp ) }
149
+ date = { new Date ( context . data . commit ? .timestamp ) }
150
150
/>
151
151
</ div >
152
152
</ div >
@@ -156,17 +156,17 @@ export const GithubDeploymentContext: FC<{
156
156
< div className = "text-muted" > Created by</ div >
157
157
< Link
158
158
to = {
159
- `https://github.com/${ context . data . commit . author . username } ` as any
159
+ `https://github.com/${ context . data . commit ? .author ? .username } ` as any
160
160
}
161
161
className = "hover:text-link flex items-center gap-2 hover:underline"
162
162
target = "_blank"
163
163
>
164
164
< img
165
- src = { `https://github.com/${ context . data . commit . author . username } .png` }
165
+ src = { `https://github.com/${ context . data . commit ? .author ? .username } .png` }
166
166
className = "size-6 rounded-md"
167
- alt = { context . data . commit . author . name }
167
+ alt = { context . data . commit ? .author ? .name }
168
168
/>
169
- { context . data . commit . author . name }
169
+ { context . data . commit ? .author ? .name }
170
170
</ Link >
171
171
</ div >
172
172
{ decoratedContext . data . workflow_status && (
You can’t perform that action at this time.
0 commit comments