1.1.1 • Published 4 years ago

github-push-global v1.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

GitHub Push Global

Travis XO code style Node Version Downloads

Commit in all repositories with a command

Installation

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

Usage

# 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"

Documentation

API Plugin

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 example

const 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
}

Tests

To run the test suite, first install the dependencies, then run test:

# NPM
npm test
# Or Using Yarn
yarn test

Dependencies

  • @octokit/rest: GitHub REST API client for Node.js
  • axios: Promise based HTTP client for the browser and node.js
  • js-yaml: YAML 1.2 parser and serializer
  • meow: CLI app helper
  • update-notifier: Update notifications for your CLI app

Dev Dependencies

  • xo: JavaScript happiness style linter ❤️

Contributors

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. List of all contributors.

License

MIT © Tiago Danin