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

fix: don't send change request info unless using the new form #7102

Merged
merged 3 commits into from
May 22, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented May 22, 2024

I realized that, in an oversight, the form now shows and sends project CR config, even if the new form isn't active. The API just ignores it if it doesn't understand it, so it's not very harmful, but it's better if we don't send it at all. This PR does that.

It does not actually test that change request info isn't included (but it does test ID inclusion). This is because:

  • change request info is only included if we're enterprise. The rendered version of the hook isn't by default.
  • Setting up module mocking and making it work seems like a lot of work for a small gain, considering we're probably going to be removing the old form anyway.
  • I've tested it locally.

Also adds some testing for the hook related to name validation and payload creation

Copy link

vercel bot commented May 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 6:39am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview May 22, 2024 6:39am

@thomasheartman thomasheartman merged commit 14fd624 into main May 22, 2024
10 checks passed
@thomasheartman thomasheartman deleted the chore/test-project-payloads-exclude-crs branch May 22, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant