Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation from private GH back to App Bug #76

Open
PseudoCoding opened this issue Oct 3, 2018 · 8 comments
Open

Navigation from private GH back to App Bug #76

PseudoCoding opened this issue Oct 3, 2018 · 8 comments

Comments

@PseudoCoding
Copy link
Contributor

Navigation for returning from a PR tries to open in app instead of browser when hooked up to different GitHub instance than github.com.

Your Version of Pullp

1.0.5

Your OS

macOS 10.13.6

Expected Behavior

Open the PR in a browser

Current Behavior

When clicking on a PR, PR renders inside of app, but there is no way to navigate back to the dashboard.

Steps to Reproduce (for bugs)

  1. Connect Pullp to separate GitHub instance
  2. Go to monitor
  3. Click on PR tile
  4. Click to open

Console Errors

N/A

@PseudoCoding
Copy link
Contributor Author

Root cause of issue:

if (navUrl.includes('github.com')) {

@PseudoCoding
Copy link
Contributor Author

I'm not super familiar with Electron, but would there be a way to get an environment variable to be used here instead?

@rkclark
Copy link
Owner

rkclark commented Oct 4, 2018

@PseudoCoding Hey man. Thanks for reporting the issue! I'd not thought of this scenario, I've never used a different Github instance and not familiar with the concept. Is it privately hosted? Does it just mean that your repo(s) have an alternative URL? Since you are seeing the repos and PRs in Pullp, they must still be accessible via the standard Github API.

Not sure whether there's a way to do something cleverer with how Electron handles the redirect so that we don't need to rely on the navUrl.includes('github.com') condition that you found. If not, another way forward might be to add some kind of config option for the Github domain.

I'm currently doing a major re-write of Pullp but could try to add a quick bug fix for this to the current build once I understand more :)

@rkclark rkclark added the bug label Oct 4, 2018
@sidick
Copy link

sidick commented Oct 4, 2018

I've used a self hosted github in a previous job, it's running on your own server and can have any DNS you chose. Maybe add an option to specify the hostname in preferences?

@rkclark
Copy link
Owner

rkclark commented Oct 4, 2018

I am considering adding a parameter to all the repo/pull request URLs which I should be able to identify with Electron, and then open that URL in a separate browser.

Something like:

https://myGithubInstance.com/rkclark/pullp?openInBrowser=true

That way there is no config needed!

@PseudoCoding
Copy link
Contributor Author

Slight aside...

TBH its was really easy to get setup on a private instance. Here's what had to be done:

  1. Configure Gatekeeper with "oauth_host": "github.ourdomain.com" in config.json
  2. Set the following config values for Pullp in .env.* files:
    REACT_APP_GITHUB_API_URL=https://github.ourdomain.com/api/graphql
    REACT_APP_GITHUB_AUTH_URL=https://github.ourdomain.com/login/oauth/authorize
    
  3. Update the line referenced above
  4. Run Gatekeeper and Pullp

All other steps were exactly as is in the ReadMe just using our private instance instead.

@PseudoCoding
Copy link
Contributor Author

No rush on getting the fix. I'll be running the application from source anyways due to the config value changes that were needed to connect to Gatekeeper. Since you're doing a rewrite, it might be a good idea to allow the connection settings to be setup through the app similar to GitHub Desktop.

@rkclark rkclark added enhancement and removed bug labels Oct 4, 2018
@rkclark
Copy link
Owner

rkclark commented Oct 4, 2018

@PseudoCoding Cool I didn't realise you were running it from source! Glad you found a way to get it up and running without too many issues. I understand better how your API calls are working now.

I'm going to re-classify this as an enhancement and pick it up further down the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants