question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`gitihub open [url]` should display a helpful error message

See original GitHub issue

Is your feature request related to a problem? Please describe.

There was a discussion in #4259 about the friction of github open displaying a dialog to confirm adding a repository, and it was agreed that this was unnecessary. #4513 has been merged, but there was an unresolved question about how we handle URLs.

Describe the solution you’d like

I’d like github open [url] to be a bit more paranoid about “things that looks like remote URLs” and defensively indicate what needs to be done.

Something like this:

$ github open https://github.com/desktop/desktop

You cannot open a remote URL in GitHub Desktop
Use `git clone https://github.com/desktop/desktop` instead to initiate the clone

And the github CLI should return an error code here.

Describe alternatives you’ve considered

The current behaviour is to consider the URL to be a relative path, and open the dialog to that “path”, which doesn’t make much sense.

I’m also 👎 on implicitly redirecting this to github clone [url] - this might also be confusing.

Teachability, Documentation, Adoption, Migration Strategy

Not sure if there’s anything else to cover off here 🤷‍♂️

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
shiftkeycommented, May 1, 2019

@msztech apologies for the delay in replying.

We have existing logic for this that could be used here, rather than hand-rolling any new checks:

https://github.com/desktop/desktop/blob/0ed30be2cece05603ff4f10d9b7c4be241299a7d/app/src/lib/remote-parsing.ts#L47-L62

0reactions
shiftkeycommented, Jul 22, 2019

This was resolved in #7452 and published as part of Desktop 2.0. Thanks again @msztech!

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub plugin should show friendly message and URL for ...
GitHub plugin shows a dialog box with error message from GitHub API and link to documentation URL. For example, the following JSON response...
Read more >
Throw helpful error messages #1126 - sindresorhus/got - GitHub
What problem are you trying to solve? I'm using Github API. On error (non-200 http status) got throws an HTTPError which is by...
Read more >
Linking a pull request to an issue - GitHub Docs
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Issues. In the list of issues, click the...
Read more >
Build error messages treated as hyperlinks to the error location
Currently in case of a build error, the only way to reach to it is to check the code file name in the...
Read more >
Creating an issue - GitHub Docs
Creating an issue from code​​ On GitHub.com, navigate to the main page of the repository. Locate the code you want to reference in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found