@@ -17,7 +17,7 @@ import Search from '../../../components/Search/Search';
1717import Pagination from '../../../components/Pagination/Pagination' ;
1818import { PushData } from '../../../../types/models' ;
1919import { trimPrefixRefsHeads , trimTrailingDotGit } from '../../../../db/helper' ;
20- import { getGitProvider , getUserProfileLink } from '../../../utils' ;
20+ import { generateAuthorLinks , generateEmailLink } from '../../../utils' ;
2121
2222interface PushesTableProps {
2323 [ key : string ] : any ;
@@ -91,8 +91,7 @@ const PushesTable: React.FC<PushesTableProps> = (props) => {
9191 < TableCell align = 'left' > Branch</ TableCell >
9292 < TableCell align = 'left' > Commit SHA</ TableCell >
9393 < TableCell align = 'left' > Committer</ TableCell >
94- < TableCell align = 'left' > Author</ TableCell >
95- < TableCell align = 'left' > Author E-mail</ TableCell >
94+ < TableCell align = 'left' > Authors</ TableCell >
9695 < TableCell align = 'left' > Commit Message</ TableCell >
9796 < TableCell align = 'left' > No. of Commits</ TableCell >
9897 < TableCell align = 'right' > </ TableCell >
@@ -104,8 +103,9 @@ const PushesTable: React.FC<PushesTableProps> = (props) => {
104103 const repoBranch = trimPrefixRefsHeads ( row . branch ) ;
105104 const repoUrl = row . url ;
106105 const repoWebUrl = trimTrailingDotGit ( repoUrl ) ;
107- const gitProvider = getGitProvider ( repoUrl ) ;
108- const hostname = new URL ( repoUrl ) . hostname ;
106+ // may be used to resolve users to profile links in future
107+ // const gitProvider = getGitProvider(repoUrl);
108+ // const hostname = new URL(repoUrl).hostname;
109109 const commitTimestamp =
110110 row . commitData [ 0 ] ?. commitTs || row . commitData [ 0 ] ?. commitTimestamp ;
111111
@@ -134,19 +134,19 @@ const PushesTable: React.FC<PushesTableProps> = (props) => {
134134 </ a >
135135 </ TableCell >
136136 < TableCell align = 'left' >
137- { getUserProfileLink ( row . commitData [ 0 ] . committer , gitProvider , hostname ) }
138- </ TableCell >
139- < TableCell align = 'left' >
140- { getUserProfileLink ( row . commitData [ 0 ] . author , gitProvider , hostname ) }
137+ { /* render github/gitlab profile links in future
138+ {getUserProfileLink(row.commitData[0].committerEmail, gitProvider, hostname)}
139+ */ }
140+ { generateEmailLink (
141+ row . commitData [ 0 ] . committer ,
142+ row . commitData [ 0 ] ?. committerEmail ,
143+ ) }
141144 </ TableCell >
142145 < TableCell align = 'left' >
143- { row . commitData [ 0 ] ?. authorEmail ? (
144- < a href = { `mailto:${ row . commitData [ 0 ] . authorEmail } ` } >
145- { row . commitData [ 0 ] . authorEmail }
146- </ a >
147- ) : (
148- 'No data...'
149- ) }
146+ { /* render github/gitlab profile links in future
147+ {getUserProfileLink(row.commitData[0].authorEmail, gitProvider, hostname)}
148+ */ }
149+ { generateAuthorLinks ( row . commitData ) }
150150 </ TableCell >
151151 < TableCell align = 'left' > { row . commitData [ 0 ] ?. message || 'N/A' } </ TableCell >
152152 < TableCell align = 'left' > { row . commitData . length } </ TableCell >
0 commit comments