Welcome to mirror list, hosted at ThFree Co, Russian Federation.

commit.js « factories « test_helpers « frontend_integration « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 09bb5fd589b8b084cf98a079cc0b12dcdaaacc75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { withValues } from '../utils/obj';
import { getCommit } from '../fixtures';
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],
  });
};