Fix relative webhooks TOML transformation #4253
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Fixes https://shopify.zendesk.com/agent/tickets/49319741
Fixes Shopify/shopify-app-template-remix#776 (comment)
The link process rewrites the TOML to transform webhook URIs like
https://example.com/webhooks
to/webhooks
when the app URL ishttps://example.com
.But when the app URL ends with a slash, like
https://example.com/
, then we were wrongly updating the webhook URI towebhooks
, causing the deploy validation to fail.WHAT is this pull request doing?
Remove the final slash from the app URL when doing that transformation, so the final result includes the required initial slash.
How to test your changes?
application_url
in the TOML tohttps://whatever.com/
/webhooks
Measuring impact
How do we know this change was effective? Please choose one:
Checklist