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

generate_branch_name.js « services « static_site_editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cbf03a41ce21cbfa2ccae5f33a09743826f73617 (plain)
1
2
3
4
5
6
7
8
import { BRANCH_SUFFIX_COUNT } from '../constants';

const generateBranchSuffix = () => `${Date.now()}`.substr(BRANCH_SUFFIX_COUNT);

const generateBranchName = (username, targetBranch) =>
  `${username}-${targetBranch}-patch-${generateBranchSuffix()}`;

export default generateBranchName;