-
Notifications
You must be signed in to change notification settings - Fork 40
feat: improve trusted account auto sync configuration and validation #6142
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
Changes from all commits
9bf7af6
d5e6523
ac12b2c
4e47eee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,3 +23,7 @@ dev/*.env | |
| user.json | ||
| .vercel | ||
| .env*.local | ||
|
|
||
| # Claude | ||
| .claude/* | ||
| CLAUDE.md | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -133,8 +133,10 @@ const createAccount = async (): Promise<string|undefined> => { | |||||||||
| hours: serviceAccountPageFormState.scheduleHours, | ||||||||||
| }, | ||||||||||
| sync_options: { | ||||||||||
| skip_project_group: serviceAccountPageFormState.skipProjectGroup, | ||||||||||
| project_group_mapping_type: serviceAccountPageFormState.projectGroupMappingType, | ||||||||||
| single_workspace_id: serviceAccountPageFormState.selectedSingleWorkspace ?? undefined, | ||||||||||
| custom_depth: serviceAccountPageFormState.customDepth ?? 1, | ||||||||||
|
||||||||||
| custom_depth: serviceAccountPageFormState.customDepth ?? 1, | |
| ...(serviceAccountPageFormState.workspaceMappingType === 'CUSTOM_DEPTH_GROUPS' | |
| ? { custom_depth: serviceAccountPageFormState.customDepth ?? 1 } | |
| : {}), |
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
custom_depthfield is sent with a default value of1when it's null or undefined (?? 1). However, this may not be appropriate for all workspace mapping types. Whenworkspace_mapping_typeis notCUSTOM_DEPTH_GROUPS, sending acustom_depthvalue could be misleading or incorrect.Consider only including
custom_depthin the payload when the workspace mapping type isCUSTOM_DEPTH_GROUPS, or document why a default of 1 is always appropriate.