blob: 247e30d20fce73d66a3265b049b620e6bf33a170 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { joinPaths } from '~/lib/utils/url_utility';
export function normalizeData(data, path, extra = () => {}) {
return data.map((d) => ({
sha: d.commit.id,
message: d.commit.message,
titleHtml: d.commit_title_html,
committedDate: d.commit.committed_date,
commitPath: d.commit_path,
fileName: d.file_name,
filePath: joinPaths(path, d.file_name),
__typename: 'LogTreeCommit',
...extra(d),
}));
}
|