GithubHelp home page GithubHelp logo

jerrygreen / git-pr Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 8 KB

a helper script for git and github to create new or open existing PR for your branch

License: MIT License

Shell 100.00%
git git-pr

git-pr's People

Contributors

jerrygreen avatar

Stargazers

 avatar

Watchers

 avatar

git-pr's Issues

Add autocompletion of existing branch names

It will help to quickly create branches like foo2, foo3

P.S. maybe not needed
P.P.S. maybe to make it some kind of git extension? so the command will look like git pr, not git-pr

Prepend branch name with "username" group

What

Using a command git-pr cool_feature I'll should have a branch: jerrygreen/cool_feature

Why

Long story short: microsoft actively uses it

Long version:

Github uses yourname:yourbranch if it's a fork. However, it looks fine for non-forks to use yourname/yourbranch. It's especially important for big projects because you bypass naming conflicts. There is also a thing called "groups" (more info on stackoverflow) - so there's already some naming convention.

How

Where to get the username?

I can setup it with git config --global user.github jerrygreen

So git config --global user.github will return:

jerrygreen

It's possible to setup already, however, this key, user.github is not standard, so it's needed to add some info about configuration to README.md. Also, if the value is not set, need to print a hint of how to set it up.

Use stashing instead of resetting

What

Use git stash & git apply functionality instead of git reset & git add

Here in the code:

https://github.com/JerryGreen/git-pr/blob/2fa809fcf9d35d8735f67c0774c7d0850a1ff629/bin/git-pr-new#L19-L22

Why

Currently the git-pr-new command is adding unstaged changes to staged (if the same file has some staged changes and unstaged changes simultaneously)

How

Some helpful links:

Behaviour for master branch

What

git-pr from master branch should open /team/project/pulls url (i.e. list of PRs)

Why

git-pr from master branch currently does nothing. So having this feature would be useful and save time while jumping between projects and urls.

Translate branch name to humanized title

For a PR title it could be cool to automatically translate branch name:

branch_name
branch-name

To humanized title:

Branch name

For title, and for commit message

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.