1.0.3 • Published 8 years ago

gh-automator v1.0.3

Weekly downloads
2
License
BSD
Repository
github
Last release
8 years ago

GH Automator

NPM version NPM downloads Build Status GitHub Issues GitHub Forks GitHub Stars

A Node GH plugin for automating git processes.

Maintained by Dustin Ryerson.

Install

[sudo] npm install -g gh gh-automator

Usage

gh automator

Alias: gh at

1. Cherry-pick fix

OptionUsageTypeDescription
-c, --cherrypickfixRequiredBooleanCommand to run
-r, --regexRequiredStringRegex to use for cherry-pick
-b, --sourcebranchRequiredStringGit branch the commits are being cherry-picked from
-s, --startinghashOptionalStringHash to start cherry-picking from
-i, --uniqueissuesOptionalBooleanList possible dependencies for failed cherry-pick
-S, --submitOptionalBooleanSubmit a pull request upon successful cherry-pick
-u, --userOptionalStringSpecify which user you are sending the pull request to
-p, --prbranchOptionalStringSpecify which branch you are sending the pull request to

Examples

  • Attempts to cherry-pick commits where the commit message contains a regular expression (ie "LPS-12345") specified by the --regex option, from the branch specified by the --sourcebranch option, to the current branch. In the event of a failed cherry-pick the --startinghash and --uniqueissues options can be used.

    ```

    gh automator --cherrypickfix --regex LPS-12345 --sourcebranch master

    ```
    * Shorthand version:
    ```

    gh at -c -r LPS-12345 -b master

    ```
  • Attempts to cherry-pick commits for LPS-12345 from the specified branch to the current branch and sends a pull request to githubUsername's ee-6.2.x branch if successful.

    ```

    gh automator --cherrypickfix --regex LPS-12345 --sourcebranch master --submit --user githubUsername --prbranch ee-6.2.x

    ```
    * Shorthand version:
    ```

    gh at -c -r LPS-12345 -b master -S -u githubUserName -p ee-6.2.x

    ```

2. Print commit messages

OptionUsageTypeDescription
-m, --printcommitmessageRequiredBooleanCommand to run
-r, --regexRequiredStringRegex to use for printing commit messages
-b, --sourcebranchOptionalStringGit branch the commit messages are being printed from

Examples

  • Prints all commit messages on the current branch containing the regular expression specified. A different branch can be specified by the --sourcebranch option.

    ```

    gh automator --printcommitmessage --regex LPS-12345

    ```
    * Shorthand version:
    ```

    gh at -m -r LPS-12345

    ```

Testing

Check Travis for continous integration results.

  • Run JSHint, a tool to detect errors and potential problems.

    ```

    npm run-script lint

    ```
  • Run Mocha, a unit test framework.

    ```

    npm run-script test

    ```

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

  • v1.0.3 January 4, 2016 * Update README

  • v1.0.2 December 23, 2015 * Update README

  • v1.0.1 August 14, 2015

  • v1.0.0 August 14, 2015 * Cherry-pick and Print Commit Message feature completion

  • v0.0.1 July 24, 2015 * Start plugin using gh-automator

License

BSD License

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago