How to use the simple-git/src/responses/MergeSummary.parse function in simple-git

To help you get started, we’ve selected a few simple-git examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zeebe-io / zeebe-modeler / tasks / sync-fork.js View on Github external
const mergeCmd = [
    'merge',
    '--no-commit',
    '--no-ff',
    syncPath
  ];

  let mergeResult;
  try {
    mergeResult = await exec('git', mergeCmd).stdout;
  } catch (e) {

    console.log(e.stderr);

    mergeResult = parseMerge(e.stdout);
  }

  if ((mergeResult.conflicts || []).length) {

    console.log('Sync: Syncing was not successful! There might be some merge' +
          'conflicts which have to be fixed before.');

    // exclude files that should not be synced
    const result = await excludeFilesFromMerge({
      conflicts: mergeResult.conflicts,
      files: [
        'client/src/app/tabs/dmn/',
        'client/src/app/tabs/cmmn/',
        'client/test/mocks/cmmn-js/',
        'client/test/mocks/dmn-js/',
        'client/src/app/tabs/bpmn/modeler/features/apply-default-templates/',