Skip to content

Commit

Permalink
DEVPROD-14383 Replace includeCommitQueue with onlyMergeQueue (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
khelif96 authored Feb 5, 2025
1 parent d19043f commit 92c7b7f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion apps/parsley/src/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Scalars["Boolean"]["input"]>;
includeHidden?: InputMaybe<Scalars["Boolean"]["input"]>;
limit?: Scalars["Int"]["input"];
/** @deprecated onlyCommitQueue is deprecated. Use onlyMergeQueue instead. */
onlyCommitQueue?: InputMaybe<Scalars["Boolean"]["input"]>;
onlyMergeQueue?: InputMaybe<Scalars["Boolean"]["input"]>;
page?: Scalars["Int"]["input"];
patchName?: Scalars["String"]["input"];
requesters?: InputMaybe<Array<Scalars["String"]["input"]>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<PatchesInput>,
"includeCommitQueue" | "onlyCommitQueue"
"onlyCommitQueue" | "onlyMergeQueue"
> => {
const [patchName] = useQueryParam<string>(PatchPageQueryParams.PatchName, "");
const [rawStatuses] = useQueryParam<string[]>(
Expand Down
3 changes: 2 additions & 1 deletion apps/spruce/src/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Scalars["Boolean"]["input"]>;
includeHidden?: InputMaybe<Scalars["Boolean"]["input"]>;
limit?: Scalars["Int"]["input"];
/** @deprecated onlyCommitQueue is deprecated. Use onlyMergeQueue instead. */
onlyCommitQueue?: InputMaybe<Scalars["Boolean"]["input"]>;
onlyMergeQueue?: InputMaybe<Scalars["Boolean"]["input"]>;
page?: Scalars["Int"]["input"];
patchName?: Scalars["String"]["input"];
requesters?: InputMaybe<Array<Scalars["String"]["input"]>>;
Expand Down
2 changes: 1 addition & 1 deletion apps/spruce/src/pages/ProjectPatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const ProjectPatches = () => {
projectIdentifier,
patchesInput: {
...patchesInput,
onlyCommitQueue: isGitHubMergeQueueCheckboxChecked,
onlyMergeQueue: isGitHubMergeQueueCheckboxChecked,
},
},
pollInterval: DEFAULT_POLL_INTERVAL,
Expand Down
2 changes: 1 addition & 1 deletion apps/spruce/src/pages/UserPatches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 92c7b7f

Please sign in to comment.