From 92c7b7f96d0691cb452805d5cedcc519acc8d34c Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Wed, 5 Feb 2025 14:11:13 -0500 Subject: [PATCH] DEVPROD-14383 Replace includeCommitQueue with onlyMergeQueue (#591) --- apps/parsley/src/gql/generated/types.ts | 3 ++- .../src/components/PatchesPage/usePatchesQueryParams.ts | 5 ++--- apps/spruce/src/gql/generated/types.ts | 3 ++- apps/spruce/src/pages/ProjectPatches.tsx | 2 +- apps/spruce/src/pages/UserPatches.tsx | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/parsley/src/gql/generated/types.ts b/apps/parsley/src/gql/generated/types.ts index 872c0f2bd..8c130dd6f 100644 --- a/apps/parsley/src/gql/generated/types.ts +++ b/apps/parsley/src/gql/generated/types.ts @@ -1731,10 +1731,11 @@ export type Patches = { * Based on the information in PatchesInput, we return a list of Patches for either an individual user or a project. */ export type PatchesInput = { - includeCommitQueue?: InputMaybe; includeHidden?: InputMaybe; limit?: Scalars["Int"]["input"]; + /** @deprecated onlyCommitQueue is deprecated. Use onlyMergeQueue instead. */ onlyCommitQueue?: InputMaybe; + onlyMergeQueue?: InputMaybe; page?: Scalars["Int"]["input"]; patchName?: Scalars["String"]["input"]; requesters?: InputMaybe>; diff --git a/apps/spruce/src/components/PatchesPage/usePatchesQueryParams.ts b/apps/spruce/src/components/PatchesPage/usePatchesQueryParams.ts index a8be2c442..267e27db7 100644 --- a/apps/spruce/src/components/PatchesPage/usePatchesQueryParams.ts +++ b/apps/spruce/src/components/PatchesPage/usePatchesQueryParams.ts @@ -8,12 +8,11 @@ import { PatchPageQueryParams, ALL_PATCH_STATUS } from "types/patch"; /** * usePatchesQueryParams is used alongside the Patches Page to transform URL state * to the input value to the patches field for the User and Project GQL type. - * @returns - An object with all input values for the patches field except includeCommitQueue - * and onlyCommitQueue + * @returns - An object with all input values for the patches field except onlyCommitQueue and onlyMergeQueue */ export const usePatchesQueryParams = (): Omit< Required, - "includeCommitQueue" | "onlyCommitQueue" + "onlyCommitQueue" | "onlyMergeQueue" > => { const [patchName] = useQueryParam(PatchPageQueryParams.PatchName, ""); const [rawStatuses] = useQueryParam( diff --git a/apps/spruce/src/gql/generated/types.ts b/apps/spruce/src/gql/generated/types.ts index 2f63ba7e8..ad2fe1b3f 100644 --- a/apps/spruce/src/gql/generated/types.ts +++ b/apps/spruce/src/gql/generated/types.ts @@ -1731,10 +1731,11 @@ export type Patches = { * Based on the information in PatchesInput, we return a list of Patches for either an individual user or a project. */ export type PatchesInput = { - includeCommitQueue?: InputMaybe; includeHidden?: InputMaybe; limit?: Scalars["Int"]["input"]; + /** @deprecated onlyCommitQueue is deprecated. Use onlyMergeQueue instead. */ onlyCommitQueue?: InputMaybe; + onlyMergeQueue?: InputMaybe; page?: Scalars["Int"]["input"]; patchName?: Scalars["String"]["input"]; requesters?: InputMaybe>; diff --git a/apps/spruce/src/pages/ProjectPatches.tsx b/apps/spruce/src/pages/ProjectPatches.tsx index fb6f4be2b..73ff7fc72 100644 --- a/apps/spruce/src/pages/ProjectPatches.tsx +++ b/apps/spruce/src/pages/ProjectPatches.tsx @@ -59,7 +59,7 @@ export const ProjectPatches = () => { projectIdentifier, patchesInput: { ...patchesInput, - onlyCommitQueue: isGitHubMergeQueueCheckboxChecked, + onlyMergeQueue: isGitHubMergeQueueCheckboxChecked, }, }, pollInterval: DEFAULT_POLL_INTERVAL, diff --git a/apps/spruce/src/pages/UserPatches.tsx b/apps/spruce/src/pages/UserPatches.tsx index 6b52ef9c2..8ba7b8622 100644 --- a/apps/spruce/src/pages/UserPatches.tsx +++ b/apps/spruce/src/pages/UserPatches.tsx @@ -31,7 +31,7 @@ export const UserPatches = () => { patchesInput: { ...patchesInput, // Always show merge queue patches for the merge queue user. - onlyCommitQueue: isMergeQueueUser, + onlyMergeQueue: isMergeQueueUser, }, }, fetchPolicy: "cache-and-network",