mehrancodes / laravel-harbor

a cli tool to Quickly create on-demand preview environment for your app on Laravel Forge.
https://www.laravel-harbor.com
MIT License
75 stars 7 forks source link

Allow environment URL to be overridden by a local environment variable #73

Closed shawnhooper closed 7 months ago

shawnhooper commented 7 months ago

Feature Improvement

Allows the environment URL that is published as part of the GitHub comment to be overridden with a local environment variable.

Use Case

In my app, I want to sent the QA team to a subdomain of the environment. Going to the bare domain the site is launched on actually doesn't return the app (by design). With this fix, I could put the URL, including subdomain, into the GitHub comment.

Implementation

Adds a FORGE_ENVIRONMENT_URL environment variable that overrides the environment URL for the forge site.

mehrancodes commented 7 months ago

Looks like a cool addition to customize the preview URL. However, we need to grab the env variable from the ForgeSetting in order to use it.

Feel free to add it at your convenience. If you find yourself short on time, don't hesitate to reach out - I'd be more than happy to assist with the addition.

shawnhooper commented 7 months ago

@mehrancodes I think I have the PR updated correctly.

I can't test it correctly right now though as my environment is getting a timeout on deployment (looks like Laravel Mix is taking too long to run).

Could you check this PR?

mehrancodes commented 7 months ago

I gave it a manual test - everything works smoothly.

Thank you for the updates, and the new feature! I would tag a new release for it today 🚀