Download wp-calypso/bin/pre-push-hook.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 627 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/bin/pre-push-hook.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/bin/pre-push-hook.js
-
curl -L -o pre-push-hook.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/bin/pre-push-hook.js
627 Bytes
| const execSync = require( 'child_process' ).execSync; | |
| const readline = require( 'readline-sync' ); | |
| console.log( | |
| '\nBy contributing to this project, you license the materials you contribute ' + | |
| 'under the GNU General Public License v2 (or later). All materials must have ' + | |
| 'GPLv2 compatible licenses — see docs/CONTRIBUTING.md for details.\n\n' | |
| ); | |
| const currentBranch = execSync( 'git rev-parse --abbrev-ref HEAD' ).toString().trim(); | |
| if ( 'trunk' === currentBranch ) { | |
| if ( ! readline.keyInYN( "You're about to push !!![ trunk ]!!!, is that what you intended?" ) ) { | |
| process.exit( 1 ); | |
| } | |
| } | |