debian-mirror-gitlab/app/assets/javascripts/repository/utils/commit.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
438 B
JavaScript
Raw Normal View History

2022-10-11 01:57:18 +05:30
import { joinPaths } from '~/lib/utils/url_utility';
2020-01-01 13:55:28 +05:30
export function normalizeData(data, path, extra = () => {}) {
2021-03-08 18:12:59 +05:30
return data.map((d) => ({
2019-12-26 22:10:19 +05:30
sha: d.commit.id,
message: d.commit.message,
2020-05-24 23:13:21 +05:30
titleHtml: d.commit_title_html,
2019-12-26 22:10:19 +05:30
committedDate: d.commit.committed_date,
commitPath: d.commit_path,
fileName: d.file_name,
2022-10-11 01:57:18 +05:30
filePath: joinPaths(path, d.file_name),
2019-12-26 22:10:19 +05:30
__typename: 'LogTreeCommit',
...extra(d),
}));
}