mirror of
https://github.com/harness/drone.git
synced 2025-05-06 17:19:13 +08:00
fix: [code-412]: fix commit message sorting (#135)
This commit is contained in:
parent
f515dc2c47
commit
eb3cad3bec
@ -158,7 +158,7 @@ export function CommitsView({
|
||||
const commitsGroupedByDate: Record<string, TypesCommit[]> = useMemo(
|
||||
() =>
|
||||
commits?.reduce((group, commit) => {
|
||||
const date = formatDate(commit.author?.when as string)
|
||||
const date = formatDate(commit.committer?.when as string)
|
||||
group[date] = (group[date] || []).concat(commit)
|
||||
return group
|
||||
}, {} as Record<string, TypesCommit[]>) || {},
|
||||
@ -195,7 +195,7 @@ export function CommitsView({
|
||||
className={css.table}
|
||||
hideHeaders
|
||||
columns={columns}
|
||||
data={orderBy(commitsByDate || [], ['author.when'], ['desc'])}
|
||||
data={orderBy(commitsByDate || [], ['committer.when'], ['desc'])}
|
||||
getRowClassName={() => css.row}
|
||||
/>
|
||||
</ThreadSection>
|
||||
|
Loading…
Reference in New Issue
Block a user