@@ -62,10 +62,32 @@ const GitCommitInfoGeneric = ({
6262 ? lowerCaseCommitInfo . commiturl
6363 : createGitCommitUrl ( materialUrl , lowerCaseCommitInfo . commit )
6464
65+ const renderBranchName = ( branchName : string ) =>
66+ branchName ? (
67+ < a
68+ href = { getGitBranchUrl ( materialUrl , branchName ) }
69+ target = "_blank"
70+ rel = "noopener noreferrer"
71+ className = "commit-hash fs-14 px-6 mono"
72+ onClick = { stopPropagation }
73+ >
74+ { branchName }
75+ </ a >
76+ ) : null
77+
6578 function renderBasicGitCommitInfoForWebhook ( ) {
6679 const _date = getWebhookDate ( materialSourceType , commitInfo )
6780 return (
6881 < div className = "flex column dc__gap-4 w-100" >
82+ < div className = "flex left lh-20 dc__gap-8 w-100" >
83+ < PullRequestIcon className = "icon-dim-16" />
84+ < div className = "flex left dc__gap-4" >
85+ Merge commit into
86+ { renderBranchName ( _webhookData . data [ 'target branch name' ] ) }
87+ from
88+ { renderBranchName ( _webhookData . data [ 'source branch name' ] ) }
89+ </ div >
90+ </ div >
6991 { _webhookData . data . author ? (
7092 < div className = "material-history__text lh-20 flex left dc__gap-8 w-100" >
7193 < PersonIcon className = "icon-dim-16" /> { _webhookData . data . author }
@@ -213,26 +235,12 @@ const GitCommitInfoGeneric = ({
213235 )
214236 }
215237
216- const renderBranchName = ( branchName : string ) =>
217- branchName ? (
218- < a
219- href = { getGitBranchUrl ( materialUrl , branchName ) }
220- target = "_blank"
221- rel = "noopener noreferrer"
222- className = "commit-hash fs-14 px-6 mono"
223- onClick = { stopPropagation }
224- >
225- { branchName }
226- </ a >
227- ) : null
228-
229238 const renderPRInfoCard = ( ) =>
230239 _isWebhook &&
231240 _webhookData . eventactiontype === WEBHOOK_EVENT_ACTION_TYPE . MERGED && (
232- < div className = "flex column dc__gap-8" >
233- { renderPullRequestId ( _webhookData . data [ 'git url' ] ) }
241+ < div className = "flex column left dc__gap-8" >
234242 < div className = "flex dc__content-space w-100" >
235- { renderWebhookTitle ( ) }
243+ { renderPullRequestId ( _webhookData . data [ 'git url' ] ) }
236244 { selectedCommitInfo ? (
237245 < div className = "flexbox dc__align-items-center dc__content-end fs-12" >
238246 { lowerCaseCommitInfo . isselected ? (
@@ -243,16 +251,7 @@ const GitCommitInfoGeneric = ({
243251 </ div >
244252 ) : null }
245253 </ div >
246-
247- < div className = "flex left lh-20 dc__gap-8 w-100" >
248- < PullRequestIcon className = "icon-dim-16" />
249- < div className = "flex left dc__gap-4" >
250- Merge commit into
251- { renderBranchName ( _webhookData . data [ 'target branch name' ] ) }
252- from
253- { renderBranchName ( _webhookData . data [ 'source branch name' ] ) }
254- </ div >
255- </ div >
254+ { renderWebhookTitle ( ) }
256255 { renderBasicGitCommitInfoForWebhook ( ) }
257256 { handleMoreDataForWebhook ( ) }
258257 </ div >
0 commit comments