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

Fallback project parameters #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jameswilson
Copy link
Contributor

@jameswilson jameswilson commented Apr 7, 2020

Two things going on in this PR:

  1. For the project parameter, the project title is now provided in the platform.sh JSON data under payload > project > title, so we can now make the project parameter optional, and an accurate fallback value can be provided.

  2. For the project_url parameter, it is expected that the URL would be in the format https://console.platform.sh/<project_owner_name>/<project_id>. I assume this parameter was exposed because the project_owner_name is not provided in the payload. However, I discovered that the Platform.sh web admin console is smart enough to reroute project URLs to the correct final URL, so that https://console.platform.sh/project/<project_id> will automatically redirect to https://console.platform.sh/<project_owner_name>/<project_id>. This means that technically, we can now provide a smart and working fallback URL, and therefore the project_url parameter is no longer required. I've left the parameter in place for backward compatibility.

Platform.sh admin console will reroute /project/<project_id> to /<owner>/<project_id>
so there is no longer a need to specify the project_url parameter to get a valid link.
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.

1 participant