-
Notifications
You must be signed in to change notification settings - Fork 368
Migrate 'entra m365group add' command to Zod validation #6850
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
Conversation
Co-authored-by: martinlingstuyl <[email protected]>
martinlingstuyl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR contains a lot of issues.
You should've used the prompt file .github/prompts/migrate-command-to-zod.prompt.md. Could you retry based on that?
@copilot please rework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rework @copilot
| ]); | ||
| assert.strictEqual(actual, true); | ||
| it('passes validation if logoPath points to an existing file', () => { | ||
| // Use the package.json which definitely exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changed how this test is working. Use the original setup
…mpt guidelines Co-authored-by: martinlingstuyl <[email protected]>
Co-authored-by: martinlingstuyl <[email protected]>
I've reworked the migration following the
The migration is complete in commit 82ffdc4. |
|
This has been added to PR #6845 |
This PR migrates the
entra m365group addcommand from the legacy validation system to use Zod schemas, following the established migration pattern from.github/prompts/migrate-command-to-zod.prompt.md.Changes Made
Command Implementation
displayNameandmailNicknameas required stringsmailNicknamevalidation to prevent spaces using schema refinementsownersandmembersvalidation using existing UPN validation utilitieslogoPathwith file existence and directory checksvisibilityvalidation for allowed values (Private/Public/HiddenMembership)Test Updates
command.validate()tocommandOptionsSchema.safeParse()commandInfo.optionsinstead of deprecatedcommand.optionscommandOptionsSchema.parse()for options parsingBenefits
The migration preserves all existing functionality while providing a more maintainable and type-safe foundation following the established project patterns.
Fixes #6849.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.