Giter Club home page Giter Club logo

safepush's People

Contributors

sunny avatar williampollet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

begault

safepush's Issues

Remove spaces between short commands

Is your feature request related to a problem? Please describe.

A shorter way to call commands

Describe the solution you'd like

Instead of safepush t l p o, being able to do safepush tlpo.

Specs

  • rspec_runner
  • github_runner
  • pronto_runner

Refactor CLI

  • Extract ruby logic in interactors / jobs / services
  • Use stdout and stderr for logging
  • Add exit codes for Thor commands

Amend last commit

Is your feature request related to a problem? Please describe.

Feature request: a command to amend to the last commit before pushing.

Describe the solution you'd like

Add the amend (or m) command that does a git commit --amend.

Example final command :

$ safepush test lint amend push
$ safepush t l m p

That way, you don't have to manually add a commit or call git commit --amend before pushing. You just need to add them and let safe pusher commit and push only if the issues are fixed.

Harmonize command names

In the following commands :

  safepush ppush           # run your favorite linter, then push on github
  safepush ppushtest       # run your favorite linters and tests, then push on github
  safepush prontorun       # launch pronto with a return message
  safepush ptest           # launch the test suite, then pronto if it is successful
  safepush pushandpr       # push your code on github, and open a PR if it is the first time
  safepush test            # launch the test suite with a return message

I feel that the name of the commands could be harmonized:

  • ppush and ptest: we use a shorthand p for pronto, but push and test are full words
  • ppushtest: shouldn't the test be before the push?
  • ptest: the documentation says that pronto is after the test, but p is before test
  • prontorun: we use the word pronto here, but p elsewhere
  • prontorun: the word run sounds superfluous since we don't use it on other commands
  • pushandpr: the and sounds superflous since we don't use it on other commands
  • push: exists but is not documented

New commands

I'd like to suggest a new naming scheme where each word marks an action that you want to do:

  • test (t) : launch rspec and break on spec failure
  • lint (l) : launch pronto and break on lint failure
  • push (p) : git push
  • open (o) : open a new PR (or the current PR if we can) in GitHub

You would list all actions seperated by spaces, or use a shorthand:

$ safepush test lint push open
$ safepush tlpo

The current commands would be equivalent to:

Before After Shorthand
safepush ppush safepush lint push safepush lp
safepush ppushtest safepush lint test push safepush ltp
safepush prontorun safepush lint safepush l
safepush ptest safepush test lint safepush tl
safepush pushandpr safepush push open safepush po
safepush test (same) safepush t
safepush push (same) safepush p

One benefit apart from harmonization is that people can choose to lint before they test or decide to push before a test and lint. Since we have 4 basic commands, that means we can have a combination of 64 possible commands, but decided by the user.

Add files

Is your feature request related to a problem? Please describe.

Feature request: adding files that would be committed before pushing.

Right now you need to add and commit every time you want to run something like safepush t l p, even though you are not sure all tests and lints are fixed. Beeing able to add and commit would help reduce the amount of steps required to test and push the changes.

Describe the solution you'd like

(Requires being able to commit or amending the latest commit (#32).)

This could use the git add --patch command to interactively choose what to add to the next commit.

Possible command names:

  • add (a)
  • patch (P).

Example final command:

safepush test lint add amend push
safepush t l a m p

Add a -v

Add a -v to show current safe pusher version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.