Commit in all repositories with a command by Tiago Danin.
Commit in all repositories with a command
Module available through the npm registry. It can be installed using the npm
or yarn
command line tools.
# NPM
npm install github-push-global --global
# Or Using Yarn
yarn global add github-push-global
# Show Help
github-push-global --help
# Basic
github-push-global \
--file="code.js" \
--to="code.js" \
--github="tiagodanin" \
--commit="Hello World" \
--mode="replace" \
--token="abcdf1234567890"
# Plugin
github-push-global \
--plugin="examples/trust-packages.js" \
--to="code.js" \
--github="tiagodanin" \
--commit="Hello World" \
--mode="replace" \
--token="abcdf1234567890"
See examples in /examples
Structure
module.exports = ctx => {
return false // Disable: git push
return ctx.raw // String: file raw
return ctx.data // Object: if is .JSON or is .YAML
}
ctx
exampleconst ctx = {
repo: {
owner: 'Tiago Danin',
name: 'GitHub-Push-Global'
},
data: {
name: 'GitHub-Push-Global'
// ... //
// If file is JSON or YML, load data here
},
raw: '{"name": "GitHub-Push-Global"}',
argv: {
op: true
} // Argv CLI
}
To run the test suite, first install the dependencies, then run test
:
# NPM
npm test
# Or Using Yarn
yarn test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. List of all contributors.
JavaScript
2