Giter VIP home page Giter VIP logo

gh-cli's Introduction

gh-cli's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gh-cli's Issues

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()

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"

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

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.