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

Stop using NOW_URL #76

Closed
wants to merge 6 commits into from
Closed

Conversation

cap10morgan
Copy link

NOW_URL is no longer set in Now 2.0 (ref: https://zeit.co/docs/v2/advanced/platform/changes-in-now-2-0/#environment-variables), so this should have been removed in the migration to Now 2.0. Instead this code now relies on NOW_REGION being set to detect Now deployments and gets the Now URL from the x-now-deployment-url request header when needed.

Also standardizes how the GitHub token is used to always be in the Authorization request header and fixes a crasher bug when there are no releases on GitHub.

It also passes --passWithNoTests to the yarn test call in the precommit hook or it wouldn't allow me to commit the fix in routes.js without creating a whole new test file for it.

Fixes #62 & #39 without the need to manually set URL to an insecure value containing your GitHub access token.

...which was removed in Now 2.0. Instead use NOW_REGION to detect now and pull URL from x-now-deployment-url request header when needed.
This shows a page w/ no releases instead of throwing an error if there are none (or none matching our filtering) on GitHub.
You can't modify routes.js otherwise.
@vercel
Copy link

vercel bot commented Oct 15, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/zeit/hazel/mo49an80a
🌍 Preview: https://hazel-git-fork-cap10morgan-fix-now-url.zeit.now.sh

@cap10morgan
Copy link
Author

What's the status of getting this merged? I have other fixes and improvements I'd like to PR but they build on this. Thanks!

@euroclydon37
Copy link

Really need this fix. I thought I could use this to serve downloads to others, but it just forwards to github and gets a 404 because they’re not signed into a GH account with access.

@dr3adx
Copy link

dr3adx commented Feb 26, 2020

CAN SOMEONE OF YOU STUPID CREATOR PIECES OF SHIT PULL THIS PR

I FUCKING HATE THAT HAZEL IS ADVERTISED IN OFFICIAL ELECTRON DOCS WHILE HAZEL DOESNT EVEN WORK ON PRIVATE REPOS!!!!!!!!!!!!!!

FUCKING DELETE THIS REPO IF YOU DUMB TRASHES ABANDONED THE PROJECT

@backroot
Copy link

Please merge this PR. I need this fix.

@ricardodantas
Copy link

Hey @cap10morgan! I would love to get this PR on Peanut.

@cap10morgan
Copy link
Author

@ricardodantas Feel free to bring it over. I no longer work for the company that had this need and I'm no longer using Hazel / NOW / Peanut.

@cap10morgan
Copy link
Author

Closing this because it's been ignored for over a year.

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

Successfully merging this pull request may close these issues.

Doesn't work for Github private repo
5 participants