mgit_go

command module
v0.0.0-...-990f712 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2020 License: MIT Imports: 1 Imported by: 0

README

mgit_go

mGit rewritten in Golang

Requirements

Installation

Usage

# Assuming you have a Jira ticket with the following info:
#       ID: JIR-642
#       Title: Update README file
mgit branch JIR-642
#=> jir-642-update-readme-file

mgit commit
#=> Message: JIR-642: Update Readme File

# If you make changes and run it again, it will make another commit with the
# same name
mgit commit
#=> Message: JIR-642: Update Readme File

mgit pull-request
#=> Title: JIR-642: Update Readme File

mgit tag
#=> Tag Title: my_project v2.1.7

Development

NOTE: The following is subject to change:

$ go run main.go help
run Git work flows for GitHub with issue tracking ticket numbers

Usage:
  mgit [command]

Available Commands:
  branch      Create a branch using issue ID and title
  commit      Create a commit and push to GitHub
  help        Help about any command
  init        Initialize local repository and push to remote
  open        Open an issue in the default web browser
  pr          Create a GitHub Pull Request for the specified branch

Flags:
      --config string   config file (default is $HOME/.mgit.yaml)
  -h, --help            help for mgit

Use "mgit [command] --help" for more information about a command.
Add a new command

New commands can be generated by doing the following:

cobra add <commandName>

Example: cobra add server -> resulting in a new cmd/server.go file.

See the Cobra add command for more info.

Style guide

General

  • Ensure that args or flags can always be provided to bypass user prompts
  • Stdout should be used for all output and stderr for warning and errors

Command descriptions

  • Description should be concise, in lowercase, and do not end in a period

Flags

  • Are preferred to arguments
  • Description should be concise, in lowercase, and do not end in a period

Colors

  • Too many contrasting colors can distract users
  • Yellow and red should be used warning and error messages
  • Color can be disabled by adding --no-color, setting COLOR=false, or when the output is not a tty.

Reference: https://devcenter.heroku.com/articles/cli-style-guide

Testing

Contributing

Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The project is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in this project’s code bases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL