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

Make HUBAPI_DOMAIN_OVERRIDE environment independent #50

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

mendel-at-hubspot
Copy link
Contributor

Description and Context

Reworks getHubSpotApiOrigin to append the environment suffix to a passed environment variable HUBAPI_DOMAIN_OVERRIDE. This makes the override independent to environments. You can no longer mistakenly pass a domain override which conflicts with the environment of the account. It also lets you "set and forget" the HUBAPI_DOMAIN_OVERRIDE variable in your shell settings, say in .zshrc, and it will work as expected in all cases.

Adds tests for urls.js to test the normal cases, as well as tests for the override behavior.

Reworks getHubSpotApiOrigin to append the environment suffix to a passed environment variable HUBAPI_DOMAIN_OVERRIDE.
This makes the override independent to environments.
You can no longer mistakenly pass a domain override which conflicts with the environment of the account.
It also lets you "set and forget" the HUBAPI_DOMAIN_OVERRIDE variable in your shell settings, say in .zshrc, and it will work as expected in all cases.

Adds tests for urls.js to test the normal cases, as well as tests for the override behavior.
@@ -0,0 +1,61 @@
const { getHubSpotApiOrigin } = require('../urls');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tests! 🙏

Copy link
Contributor

@brandenrodgers brandenrodgers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👌

@mendel-at-hubspot mendel-at-hubspot merged commit 8ccb1e5 into main Mar 20, 2024
1 check passed
@mendel-at-hubspot mendel-at-hubspot deleted the better-domain-override branch March 20, 2024 14:57
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.

2 participants