nodejs / node-core-utils

CLI tools for Node.js Core collaborators
https://nodejs.github.io/node-core-utils/
MIT License
234 stars 106 forks source link

bin: custom git commands #106

Closed joyeecheung closed 6 years ago

joyeecheung commented 6 years ago

This was https://github.com/nodejs/node-core-utils/pull/98 , opening a new PR because the repo has been transferred so I need to update the branch of my fork instead.

codecov[bot] commented 6 years ago

Codecov Report

Merging #106 into master will decrease coverage by 2.19%. The diff coverage is 7.14%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #106     +/-   ##
=========================================
- Coverage   98.05%   95.86%   -2.2%     
=========================================
  Files          15       15             
  Lines         567      581     +14     
=========================================
+ Hits          556      557      +1     
- Misses         11       24     +13
Impacted Files Coverage Δ
lib/cli.js 73.77% <7.14%> (-19.85%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update acc9e3a...ad7a7a7. Read the comment docs.

joyeecheung commented 6 years ago

Note that this is still WIP, I would still need to find some time to port the rest of the bash scripts to Node.js scripts. Although I have been using this fork locally to land stuff anyways.

priyank-p commented 6 years ago

I totally did not mean to hit approve meant to comment...

priyank-p commented 6 years ago

@joyeecheung tried to port bash scripts to node-script and this is currently what i have. https://gist.github.com/cPhost/dec7ce68a09907791ce99147feb618e9

(I this help great! 👍 )

joyeecheung commented 6 years ago

@cPhost Thanks, but the porting is not really what's blocking me right now...The more I use it, the more I prefer the git node land --continue concept (I don't really like to remember all those sub commands, even if they are devised by myself. Also it's kinda annoying that I have to paste the PR id multiple times), so the commands kinda need a rework to mimic a git rebase session.

priyank-p commented 6 years ago

Also after landing this before publishing to npm, we need to ensure the Windows compatibility.

priyank-p commented 6 years ago

After thinking about sub commands i think we should have then and and implement single land script that does all the things at once with the subcommands.

joyeecheung commented 6 years ago

Recording of working prototype: https://asciinema.org/a/6i3gFDSAr7L6fYPSEaMrW0asO

joyeecheung commented 6 years ago

I've been using it for about two months now and it seems to be working pretty well. There are still a few things that need to be addressed:

  1. core-validate-commit must be installed
  2. core-validate-commit still complains about commit titles > 50 char so git node land --final fails from time to time. (should be fixed by https://github.com/nodejs/core-validate-commit/pull/18)
  3. Needs some docs
  4. Needs some tests (would be a bit trickier to set up since it involves a lot of git operations)

I think when I finished 3 this should be ready to land on master.

joyeecheung commented 6 years ago

Docs done. Demos:

Landing multiple commits: https://asciinema.org/a/148627 Landing one commit: https://asciinema.org/a/157445

This should be ready to merge.

priyank-p commented 6 years ago

This Looks good to me :)

joyeecheung commented 6 years ago

I am going to merge this and release a new version. Let's see how it works in the wild.