Coder Social home page Coder Social logo

cbrgm / gh-fused Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 31 KB

Collection of powerful aliases to speed up interactions with GitHub issues, PRs and more! ๐Ÿš€

License: Apache License 2.0

Shell 100.00%
bash cli gh github productivity zsh zsh-plugin

gh-fused's Introduction

gh-fused

Collection of powerful aliases combining gh and fzf to speed up interactions with GitHub. It's purpose is to be a CLI clone of github.com/pulls and github.com/issues and it can be so much more!.

Try them out and you won't live without them anymore ๐Ÿš€

Prerequisites?

Installation

You can directly download the ghfused.source and save it in some directory.

Download:

curl -LO https://raw.githubusercontent.com/cbrgm/gh-fused/main/ghfused.source

then add to your .bashrc/.zshrc file:

[ -f <path-to>/ghfused.source ] && source <path-to>/ghfused.source

Alternatively you can install ghfused using the ZSH plugin manager of your choice.

Usage

Usage of ghfused aliases (you can check them by running ghhelp once installed)

Usage of ghfused aliases

Collection of powerful aliases to speed up interactions with GitHub
Find more information at https://github.com/cbrgm/ghfused

Usage:
# [ghspr] Fuzzy searches for pull requests and allows the user to open them in a web browser.
# [ghpr] Search for open pull requests created by the current user.
# [ghpra] Search for open pull requests assigned to the current user.
# [ghprm] Search for open pull requests with mentions of the current user.
# [ghrr] Search for open pull requests with review requests wanted from the current user.
# [gshi] Fuzzy searches for issues and allows the user to open them in a browser
# [ghi] Search for open issues created by the current user.
# [ghia] Search for open issues assigned to the current user.
# [ghim] Search for open issues with mentions of the current user.
# [ghsr] Fuzzy searches for repositories and allows the user to open them in a browser
# [ghhelp] show this help message

Explanations

Github Search enchanced!

The three aliases

  • ghspr ([gh]ithub [s]earch [p]ull [r]equest)
  • ghsi ([gh]ithub [s]earch [i]ssue)
  • ghsr ([gh]ithub [s]earch [r]epository)

are equal to the default search subcommands provided by the gh command, but combines them with fuzzy searching with fzf.

Fine-tuned defaults for PRs!

  • ghpr Search for open pull requests created by the current user.
  • ghpra Search for open pull requests assigned to the current user.
  • ghprm Search for open pull requests with mentions of the current user.
  • ghrr Search for open pull requests with review requests wanted from the current user.

Fine-tuned defaults for issues!

  • ghi Search for open issues created by the current user.
  • ghia Search for open issues assigned to the current user.
  • ghim Search for open issues with mentions of the current user.

Some handy examples

Fuzzy search open PRs which requested a review from you, approve.

 # long
 ghspr --sort=updated --limit 100 --review-requested=@me --archived=false --state=open | xargs -I{} sh -c 'gh pr review --approve {}'
 # short
 ghrr | xargs -I{} sh -c 'gh pr review --approve {}'

Fuzzy search open PRs which requested a review from you, approve and merge.

 # long
 ghspr --sort=updated --limit 100 --review-requested=@me --archived=false --state=open | xargs -I{} sh -c 'gh pr review --approve {} && gh pr merge --squash {}'
 # short
 ghrr | xargs -I{} sh -c 'gh pr review --approve {} && gh pr merge --squash {}'

Flags

Supports all options that gh search repos/issues/prs supports, except for --json and --template which are being utilized by this extension.

Contributing & License

Feel free to submit changes! See the Contributing Guide. This project is open-source and is developed under the terms of the Apache 2.0 License.

gh-fused's People

Contributors

cbrgm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.