• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ckeditor / ckeditor5-package-generator / 983

pending completion
983

cron

travis-ci-com

web-flow
Merge pull request #134 from ckeditor/ci/2269

Internal: Use `ckeditor5-dev-ci-notify-travis-status` script from new package `ckeditor5-dev-ci`.

111 of 111 branches covered (100.0%)

Branch coverage included in aggregate %.

412 of 412 relevant lines covered (100.0%)

8.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/packages/ckeditor5-package-generator/lib/utils/initialize-git-repository.js
1
/**
2
 * @license Copyright (c) 2020-2022, CKSource Holding sp. z o.o. All rights reserved.
3
 * For licensing, see LICENSE.md.
4
 */
5

6
'use strict';
7

8
const path = require( 'path' );
5✔
9
const fs = require( 'fs' );
5✔
10
const { execSync } = require( 'child_process' );
5✔
11

12
/**
13
 * @param {string} directoryPath
14
 * @param {Logger} logger
15
 */
16
module.exports = function initializeGitRepository( directoryPath, logger ) {
5✔
17
        logger.process( 'Initializing Git repository...' );
4✔
18

19
        const options = {
4✔
20
                stdio: 'ignore',
21
                cwd: directoryPath
22
        };
23

24
        execSync( 'git init', options );
4✔
25

26
        try {
4✔
27
                execSync( 'git add -A', options );
4✔
28
                execSync( 'git commit -m "Initialize the repository using CKEditor 5 Package Generator."', options );
4✔
29
        } catch ( error ) {
30
                // Remove the `.git` directory in case of an error. It may happen that the developer didn't configure Git yet.
31
                // We could have resolved the error ourselves.
32
                // See: https://github.com/ember-cli/ember-cli/blob/3192a441e13ec7e88c71d480778971d81bfa436c/lib/tasks/git-init.js#L49-L66.
33
                fs.removeSync( path.join( directoryPath, '.git' ) );
1✔
34
        }
35
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc