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.

15 lines
398 B
JavaScript
Raw Normal View History

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,
2020-01-01 13:55:28 +05:30
filePath: `${path}/${d.file_name}`,
2019-12-26 22:10:19 +05:30
type: d.type,
__typename: 'LogTreeCommit',
...extra(d),
}));
}