mirror of
https://github.com/harness/drone.git
synced 2025-05-06 21:21:00 +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(
|
const commitsGroupedByDate: Record<string, TypesCommit[]> = useMemo(
|
||||||
() =>
|
() =>
|
||||||
commits?.reduce((group, commit) => {
|
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)
|
group[date] = (group[date] || []).concat(commit)
|
||||||
return group
|
return group
|
||||||
}, {} as Record<string, TypesCommit[]>) || {},
|
}, {} as Record<string, TypesCommit[]>) || {},
|
||||||
@ -195,7 +195,7 @@ export function CommitsView({
|
|||||||
className={css.table}
|
className={css.table}
|
||||||
hideHeaders
|
hideHeaders
|
||||||
columns={columns}
|
columns={columns}
|
||||||
data={orderBy(commitsByDate || [], ['author.when'], ['desc'])}
|
data={orderBy(commitsByDate || [], ['committer.when'], ['desc'])}
|
||||||
getRowClassName={() => css.row}
|
getRowClassName={() => css.row}
|
||||||
/>
|
/>
|
||||||
</ThreadSection>
|
</ThreadSection>
|
||||||
|
Loading…
Reference in New Issue
Block a user