debian-mirror-gitlab/spec/frontend_integration/test_helpers/factories/commit.js

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

15 lines
408 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import { getCommit } from '../fixtures';
2021-03-11 19:13:27 +05:30
import { withValues } from '../utils/obj';
2020-10-24 23:57:45 +05:30
import { createCommitId } from './commit_id';
export const createNewCommit = ({ id = createCommitId(), message }, orig = getCommit()) => {
return withValues(orig, {
id,
short_id: id.substr(0, 8),
message,
title: message,
web_url: orig.web_url.replace(orig.id, id),
parent_ids: [orig.id],
});
};