Coder Social home page Coder Social logo

bchadwic / gh-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cli/cli

4.0 4.0 4.0 26.05 MB

GitHub’s official command line tool

Home Page: https://cli.github.com

License: MIT License

Go 99.78% Makefile 0.07% Shell 0.12% PowerShell 0.02% Batchfile 0.01% Dockerfile 0.01%

gh-cli's Introduction

gh-cli's People

Contributors

adonovan avatar aliabbasmerchant avatar ampinsk avatar bchadwic avatar bchuecos avatar billygriffin avatar chemotaxis avatar cmbrose avatar cristiand391 avatar cwndrws avatar dependabot[bot] avatar doi-t avatar g14a avatar heaths avatar issyl0 avatar jlsestak avatar josebalius avatar jshorty avatar jungaretti avatar meiji163 avatar mislav avatar probablycorey avatar pxrth9 avatar ravocean avatar reybard avatar samcoe avatar shubhankarkg avatar tierninho avatar vilmibm avatar znull avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gh-cli's Issues

Work on parsing arguments

Understand how arguments are passed through the cli

  1. look into making a ViewOptions struct
  2. using a struct or strictly parsing, work on concatenating it to the url to open in browser

Finished example:
gh browse "main.go" || main.go?

Still considering quotes or not

Clean up !hasArgs if block

I think we should consider making the exitCode start at the top as successful, then if it reaches any point where the command is unsuccessful, we can change the variable. That way at the end, we just have to check if the exitCode is successful, if so open the browser and print the success message, if not, print the error message and return. This reduces the amount of locations calling exitPrint to two locations in the main run function

Consider all cases of --branch

Describe the bug

Two considerations for solutions

  1. Make sure branch takes two arguments
  2. If branch only has one arg, consider opening that branch in the browser w/o file

gh browse --branch "actions-demo"

Reformat line number flag to part of the arg

Describe the bug

To create line number navigation more efficient and more standard use "main.go:32" instead of a flag --line 32

Expected vs actual behavior

From "gh browse "main.go" --line 32"
To "gh browse "main.go:32"

Works on valid page request

  1. Send a request to the GH api and see if you receive a 404
  2. if no 404 is found, return true as a function

function name ideas:

  • validPageRequest()

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.