diff --git a/packages/mergebot/src/_tests/fixturedActions.test.ts b/packages/mergebot/src/_tests/fixturedActions.test.ts index aae1d55d9a..eaa9bf71a0 100644 --- a/packages/mergebot/src/_tests/fixturedActions.test.ts +++ b/packages/mergebot/src/_tests/fixturedActions.test.ts @@ -8,7 +8,7 @@ import { PR } from "../queries/schema/PR"; import { readJsonSync, scrubDiagnosticDetails } from "../util/util"; import * as cachedQueries from "./cachedQueries.json"; jest.mock("../util/cachedQueries", () => ({ - getProjectBoardColumns: jest.fn(() => new Map(cachedQueries.getProjectBoardColumns.map(o => [o.name,o.optionId]))), + getProjectBoardColumns: jest.fn(() => new Map(cachedQueries.getProjectBoardColumns.map((o) => [o.name, o.optionId]))), getLabels: jest.fn(() => cachedQueries.getLabels), })); import { executePrActions } from "../execute-pr-actions"; diff --git a/packages/mergebot/src/queries/pr-query.ts b/packages/mergebot/src/queries/pr-query.ts index 584cafda62..0c6dace1c7 100644 --- a/packages/mergebot/src/queries/pr-query.ts +++ b/packages/mergebot/src/queries/pr-query.ts @@ -187,7 +187,11 @@ const getPRInfoQueryFirst: TypedDocumentNode = gql` fieldValueByName(name: "Status") { ... on ProjectV2ItemFieldSingleSelectValue { name - field { ... on ProjectV2SingleSelectField { id } } + field { + ... on ProjectV2SingleSelectField { + id + } + } } } } diff --git a/packages/mergebot/src/queries/schema/CardIdToPr.ts b/packages/mergebot/src/queries/schema/CardIdToPr.ts index 1cffc6db0b..c23da77d05 100644 --- a/packages/mergebot/src/queries/schema/CardIdToPr.ts +++ b/packages/mergebot/src/queries/schema/CardIdToPr.ts @@ -10,7 +10,249 @@ import { PullRequestState } from "./graphql-global-types"; // ==================================================== export interface CardIdToPr_node_AddedToMergeQueueEvent { - __typename: "AddedToMergeQueueEvent" | "AddedToProjectEvent" | "App" | "AssignedEvent" | "AutoMergeDisabledEvent" | "AutoMergeEnabledEvent" | "AutoRebaseEnabledEvent" | "AutoSquashEnabledEvent" | "AutomaticBaseChangeFailedEvent" | "AutomaticBaseChangeSucceededEvent" | "BaseRefChangedEvent" | "BaseRefDeletedEvent" | "BaseRefForcePushedEvent" | "Blob" | "Bot" | "BranchProtectionRule" | "BypassForcePushAllowance" | "BypassPullRequestAllowance" | "CWE" | "CheckRun" | "CheckSuite" | "ClosedEvent" | "CodeOfConduct" | "CommentDeletedEvent" | "Commit" | "CommitComment" | "CommitCommentThread" | "Comparison" | "ConnectedEvent" | "ConvertToDraftEvent" | "ConvertedNoteToIssueEvent" | "ConvertedToDiscussionEvent" | "CrossReferencedEvent" | "DemilestonedEvent" | "DependencyGraphManifest" | "DeployKey" | "DeployedEvent" | "Deployment" | "DeploymentEnvironmentChangedEvent" | "DeploymentReview" | "DeploymentStatus" | "DisconnectedEvent" | "Discussion" | "DiscussionCategory" | "DiscussionComment" | "DiscussionPoll" | "DiscussionPollOption" | "DraftIssue" | "Enterprise" | "EnterpriseAdministratorInvitation" | "EnterpriseIdentityProvider" | "EnterpriseMemberInvitation" | "EnterpriseRepositoryInfo" | "EnterpriseServerInstallation" | "EnterpriseServerUserAccount" | "EnterpriseServerUserAccountEmail" | "EnterpriseServerUserAccountsUpload" | "EnterpriseUserAccount" | "Environment" | "ExternalIdentity" | "Gist" | "GistComment" | "HeadRefDeletedEvent" | "HeadRefForcePushedEvent" | "HeadRefRestoredEvent" | "IpAllowListEntry" | "Issue" | "IssueComment" | "Label" | "LabeledEvent" | "Language" | "License" | "LinkedBranch" | "LockedEvent" | "Mannequin" | "MarkedAsDuplicateEvent" | "MarketplaceCategory" | "MarketplaceListing" | "MemberFeatureRequestNotification" | "MembersCanDeleteReposClearAuditEntry" | "MembersCanDeleteReposDisableAuditEntry" | "MembersCanDeleteReposEnableAuditEntry" | "MentionedEvent" | "MergeQueue" | "MergeQueueEntry" | "MergedEvent" | "MigrationSource" | "Milestone" | "MilestonedEvent" | "MovedColumnsInProjectEvent" | "OIDCProvider" | "OauthApplicationCreateAuditEntry" | "OrgAddBillingManagerAuditEntry" | "OrgAddMemberAuditEntry" | "OrgBlockUserAuditEntry" | "OrgConfigDisableCollaboratorsOnlyAuditEntry" | "OrgConfigEnableCollaboratorsOnlyAuditEntry" | "OrgCreateAuditEntry" | "OrgDisableOauthAppRestrictionsAuditEntry" | "OrgDisableSamlAuditEntry" | "OrgDisableTwoFactorRequirementAuditEntry" | "OrgEnableOauthAppRestrictionsAuditEntry" | "OrgEnableSamlAuditEntry" | "OrgEnableTwoFactorRequirementAuditEntry" | "OrgInviteMemberAuditEntry" | "OrgInviteToBusinessAuditEntry" | "OrgOauthAppAccessApprovedAuditEntry" | "OrgOauthAppAccessBlockedAuditEntry" | "OrgOauthAppAccessDeniedAuditEntry" | "OrgOauthAppAccessRequestedAuditEntry" | "OrgOauthAppAccessUnblockedAuditEntry" | "OrgRemoveBillingManagerAuditEntry" | "OrgRemoveMemberAuditEntry" | "OrgRemoveOutsideCollaboratorAuditEntry" | "OrgRestoreMemberAuditEntry" | "OrgUnblockUserAuditEntry" | "OrgUpdateDefaultRepositoryPermissionAuditEntry" | "OrgUpdateMemberAuditEntry" | "OrgUpdateMemberRepositoryCreationPermissionAuditEntry" | "OrgUpdateMemberRepositoryInvitationPermissionAuditEntry" | "Organization" | "OrganizationIdentityProvider" | "OrganizationInvitation" | "OrganizationMigration" | "Package" | "PackageFile" | "PackageTag" | "PackageVersion" | "PinnedDiscussion" | "PinnedEnvironment" | "PinnedEvent" | "PinnedIssue" | "PrivateRepositoryForkingDisableAuditEntry" | "PrivateRepositoryForkingEnableAuditEntry" | "Project" | "ProjectCard" | "ProjectColumn" | "ProjectV2" | "ProjectV2Field" | "ProjectV2ItemFieldDateValue" | "ProjectV2ItemFieldIterationValue" | "ProjectV2ItemFieldNumberValue" | "ProjectV2ItemFieldSingleSelectValue" | "ProjectV2ItemFieldTextValue" | "ProjectV2IterationField" | "ProjectV2SingleSelectField" | "ProjectV2StatusUpdate" | "ProjectV2View" | "ProjectV2Workflow" | "PublicKey" | "PullRequest" | "PullRequestCommit" | "PullRequestCommitCommentThread" | "PullRequestReview" | "PullRequestReviewComment" | "PullRequestReviewThread" | "PullRequestThread" | "Push" | "PushAllowance" | "Reaction" | "ReadyForReviewEvent" | "Ref" | "ReferencedEvent" | "Release" | "ReleaseAsset" | "RemovedFromMergeQueueEvent" | "RemovedFromProjectEvent" | "RenamedTitleEvent" | "ReopenedEvent" | "RepoAccessAuditEntry" | "RepoAddMemberAuditEntry" | "RepoAddTopicAuditEntry" | "RepoArchivedAuditEntry" | "RepoChangeMergeSettingAuditEntry" | "RepoConfigDisableAnonymousGitAccessAuditEntry" | "RepoConfigDisableCollaboratorsOnlyAuditEntry" | "RepoConfigDisableContributorsOnlyAuditEntry" | "RepoConfigDisableSockpuppetDisallowedAuditEntry" | "RepoConfigEnableAnonymousGitAccessAuditEntry" | "RepoConfigEnableCollaboratorsOnlyAuditEntry" | "RepoConfigEnableContributorsOnlyAuditEntry" | "RepoConfigEnableSockpuppetDisallowedAuditEntry" | "RepoConfigLockAnonymousGitAccessAuditEntry" | "RepoConfigUnlockAnonymousGitAccessAuditEntry" | "RepoCreateAuditEntry" | "RepoDestroyAuditEntry" | "RepoRemoveMemberAuditEntry" | "RepoRemoveTopicAuditEntry" | "Repository" | "RepositoryInvitation" | "RepositoryMigration" | "RepositoryRule" | "RepositoryRuleset" | "RepositoryRulesetBypassActor" | "RepositoryTopic" | "RepositoryVisibilityChangeDisableAuditEntry" | "RepositoryVisibilityChangeEnableAuditEntry" | "RepositoryVulnerabilityAlert" | "ReviewDismissalAllowance" | "ReviewDismissedEvent" | "ReviewRequest" | "ReviewRequestRemovedEvent" | "ReviewRequestedEvent" | "SavedReply" | "SecurityAdvisory" | "SponsorsActivity" | "SponsorsListing" | "SponsorsListingFeaturedItem" | "SponsorsTier" | "Sponsorship" | "SponsorshipNewsletter" | "Status" | "StatusCheckRollup" | "StatusContext" | "SubscribedEvent" | "Tag" | "Team" | "TeamAddMemberAuditEntry" | "TeamAddRepositoryAuditEntry" | "TeamChangeParentTeamAuditEntry" | "TeamDiscussion" | "TeamDiscussionComment" | "TeamRemoveMemberAuditEntry" | "TeamRemoveRepositoryAuditEntry" | "Topic" | "TransferredEvent" | "Tree" | "UnassignedEvent" | "UnlabeledEvent" | "UnlockedEvent" | "UnmarkedAsDuplicateEvent" | "UnpinnedEvent" | "UnsubscribedEvent" | "User" | "UserBlockedEvent" | "UserContentEdit" | "UserList" | "UserStatus" | "VerifiableDomain" | "Workflow" | "WorkflowRun" | "WorkflowRunFile"; + __typename: + | "AddedToMergeQueueEvent" + | "AddedToProjectEvent" + | "App" + | "AssignedEvent" + | "AutoMergeDisabledEvent" + | "AutoMergeEnabledEvent" + | "AutoRebaseEnabledEvent" + | "AutoSquashEnabledEvent" + | "AutomaticBaseChangeFailedEvent" + | "AutomaticBaseChangeSucceededEvent" + | "BaseRefChangedEvent" + | "BaseRefDeletedEvent" + | "BaseRefForcePushedEvent" + | "Blob" + | "Bot" + | "BranchProtectionRule" + | "BypassForcePushAllowance" + | "BypassPullRequestAllowance" + | "CWE" + | "CheckRun" + | "CheckSuite" + | "ClosedEvent" + | "CodeOfConduct" + | "CommentDeletedEvent" + | "Commit" + | "CommitComment" + | "CommitCommentThread" + | "Comparison" + | "ConnectedEvent" + | "ConvertToDraftEvent" + | "ConvertedNoteToIssueEvent" + | "ConvertedToDiscussionEvent" + | "CrossReferencedEvent" + | "DemilestonedEvent" + | "DependencyGraphManifest" + | "DeployKey" + | "DeployedEvent" + | "Deployment" + | "DeploymentEnvironmentChangedEvent" + | "DeploymentReview" + | "DeploymentStatus" + | "DisconnectedEvent" + | "Discussion" + | "DiscussionCategory" + | "DiscussionComment" + | "DiscussionPoll" + | "DiscussionPollOption" + | "DraftIssue" + | "Enterprise" + | "EnterpriseAdministratorInvitation" + | "EnterpriseIdentityProvider" + | "EnterpriseMemberInvitation" + | "EnterpriseRepositoryInfo" + | "EnterpriseServerInstallation" + | "EnterpriseServerUserAccount" + | "EnterpriseServerUserAccountEmail" + | "EnterpriseServerUserAccountsUpload" + | "EnterpriseUserAccount" + | "Environment" + | "ExternalIdentity" + | "Gist" + | "GistComment" + | "HeadRefDeletedEvent" + | "HeadRefForcePushedEvent" + | "HeadRefRestoredEvent" + | "IpAllowListEntry" + | "Issue" + | "IssueComment" + | "Label" + | "LabeledEvent" + | "Language" + | "License" + | "LinkedBranch" + | "LockedEvent" + | "Mannequin" + | "MarkedAsDuplicateEvent" + | "MarketplaceCategory" + | "MarketplaceListing" + | "MemberFeatureRequestNotification" + | "MembersCanDeleteReposClearAuditEntry" + | "MembersCanDeleteReposDisableAuditEntry" + | "MembersCanDeleteReposEnableAuditEntry" + | "MentionedEvent" + | "MergeQueue" + | "MergeQueueEntry" + | "MergedEvent" + | "MigrationSource" + | "Milestone" + | "MilestonedEvent" + | "MovedColumnsInProjectEvent" + | "OIDCProvider" + | "OauthApplicationCreateAuditEntry" + | "OrgAddBillingManagerAuditEntry" + | "OrgAddMemberAuditEntry" + | "OrgBlockUserAuditEntry" + | "OrgConfigDisableCollaboratorsOnlyAuditEntry" + | "OrgConfigEnableCollaboratorsOnlyAuditEntry" + | "OrgCreateAuditEntry" + | "OrgDisableOauthAppRestrictionsAuditEntry" + | "OrgDisableSamlAuditEntry" + | "OrgDisableTwoFactorRequirementAuditEntry" + | "OrgEnableOauthAppRestrictionsAuditEntry" + | "OrgEnableSamlAuditEntry" + | "OrgEnableTwoFactorRequirementAuditEntry" + | "OrgInviteMemberAuditEntry" + | "OrgInviteToBusinessAuditEntry" + | "OrgOauthAppAccessApprovedAuditEntry" + | "OrgOauthAppAccessBlockedAuditEntry" + | "OrgOauthAppAccessDeniedAuditEntry" + | "OrgOauthAppAccessRequestedAuditEntry" + | "OrgOauthAppAccessUnblockedAuditEntry" + | "OrgRemoveBillingManagerAuditEntry" + | "OrgRemoveMemberAuditEntry" + | "OrgRemoveOutsideCollaboratorAuditEntry" + | "OrgRestoreMemberAuditEntry" + | "OrgUnblockUserAuditEntry" + | "OrgUpdateDefaultRepositoryPermissionAuditEntry" + | "OrgUpdateMemberAuditEntry" + | "OrgUpdateMemberRepositoryCreationPermissionAuditEntry" + | "OrgUpdateMemberRepositoryInvitationPermissionAuditEntry" + | "Organization" + | "OrganizationIdentityProvider" + | "OrganizationInvitation" + | "OrganizationMigration" + | "Package" + | "PackageFile" + | "PackageTag" + | "PackageVersion" + | "PinnedDiscussion" + | "PinnedEnvironment" + | "PinnedEvent" + | "PinnedIssue" + | "PrivateRepositoryForkingDisableAuditEntry" + | "PrivateRepositoryForkingEnableAuditEntry" + | "Project" + | "ProjectCard" + | "ProjectColumn" + | "ProjectV2" + | "ProjectV2Field" + | "ProjectV2ItemFieldDateValue" + | "ProjectV2ItemFieldIterationValue" + | "ProjectV2ItemFieldNumberValue" + | "ProjectV2ItemFieldSingleSelectValue" + | "ProjectV2ItemFieldTextValue" + | "ProjectV2IterationField" + | "ProjectV2SingleSelectField" + | "ProjectV2StatusUpdate" + | "ProjectV2View" + | "ProjectV2Workflow" + | "PublicKey" + | "PullRequest" + | "PullRequestCommit" + | "PullRequestCommitCommentThread" + | "PullRequestReview" + | "PullRequestReviewComment" + | "PullRequestReviewThread" + | "PullRequestThread" + | "Push" + | "PushAllowance" + | "Reaction" + | "ReadyForReviewEvent" + | "Ref" + | "ReferencedEvent" + | "Release" + | "ReleaseAsset" + | "RemovedFromMergeQueueEvent" + | "RemovedFromProjectEvent" + | "RenamedTitleEvent" + | "ReopenedEvent" + | "RepoAccessAuditEntry" + | "RepoAddMemberAuditEntry" + | "RepoAddTopicAuditEntry" + | "RepoArchivedAuditEntry" + | "RepoChangeMergeSettingAuditEntry" + | "RepoConfigDisableAnonymousGitAccessAuditEntry" + | "RepoConfigDisableCollaboratorsOnlyAuditEntry" + | "RepoConfigDisableContributorsOnlyAuditEntry" + | "RepoConfigDisableSockpuppetDisallowedAuditEntry" + | "RepoConfigEnableAnonymousGitAccessAuditEntry" + | "RepoConfigEnableCollaboratorsOnlyAuditEntry" + | "RepoConfigEnableContributorsOnlyAuditEntry" + | "RepoConfigEnableSockpuppetDisallowedAuditEntry" + | "RepoConfigLockAnonymousGitAccessAuditEntry" + | "RepoConfigUnlockAnonymousGitAccessAuditEntry" + | "RepoCreateAuditEntry" + | "RepoDestroyAuditEntry" + | "RepoRemoveMemberAuditEntry" + | "RepoRemoveTopicAuditEntry" + | "Repository" + | "RepositoryInvitation" + | "RepositoryMigration" + | "RepositoryRule" + | "RepositoryRuleset" + | "RepositoryRulesetBypassActor" + | "RepositoryTopic" + | "RepositoryVisibilityChangeDisableAuditEntry" + | "RepositoryVisibilityChangeEnableAuditEntry" + | "RepositoryVulnerabilityAlert" + | "ReviewDismissalAllowance" + | "ReviewDismissedEvent" + | "ReviewRequest" + | "ReviewRequestRemovedEvent" + | "ReviewRequestedEvent" + | "SavedReply" + | "SecurityAdvisory" + | "SponsorsActivity" + | "SponsorsListing" + | "SponsorsListingFeaturedItem" + | "SponsorsTier" + | "Sponsorship" + | "SponsorshipNewsletter" + | "Status" + | "StatusCheckRollup" + | "StatusContext" + | "SubscribedEvent" + | "Tag" + | "Team" + | "TeamAddMemberAuditEntry" + | "TeamAddRepositoryAuditEntry" + | "TeamChangeParentTeamAuditEntry" + | "TeamDiscussion" + | "TeamDiscussionComment" + | "TeamRemoveMemberAuditEntry" + | "TeamRemoveRepositoryAuditEntry" + | "Topic" + | "TransferredEvent" + | "Tree" + | "UnassignedEvent" + | "UnlabeledEvent" + | "UnlockedEvent" + | "UnmarkedAsDuplicateEvent" + | "UnpinnedEvent" + | "UnsubscribedEvent" + | "User" + | "UserBlockedEvent" + | "UserContentEdit" + | "UserList" + | "UserStatus" + | "VerifiableDomain" + | "Workflow" + | "WorkflowRun" + | "WorkflowRunFile"; } export interface CardIdToPr_node_ProjectV2Item_content_DraftIssue { @@ -29,7 +271,9 @@ export interface CardIdToPr_node_ProjectV2Item_content_PullRequest { number: number; } -export type CardIdToPr_node_ProjectV2Item_content = CardIdToPr_node_ProjectV2Item_content_DraftIssue | CardIdToPr_node_ProjectV2Item_content_PullRequest; +export type CardIdToPr_node_ProjectV2Item_content = + | CardIdToPr_node_ProjectV2Item_content_DraftIssue + | CardIdToPr_node_ProjectV2Item_content_PullRequest; export interface CardIdToPr_node_ProjectV2Item { __typename: "ProjectV2Item"; diff --git a/packages/mergebot/src/queries/schema/GetFileContent.ts b/packages/mergebot/src/queries/schema/GetFileContent.ts index a245c7366a..ab24fa38b2 100644 --- a/packages/mergebot/src/queries/schema/GetFileContent.ts +++ b/packages/mergebot/src/queries/schema/GetFileContent.ts @@ -23,7 +23,9 @@ export interface GetFileContent_repository_object_Blob { byteSize: number; } -export type GetFileContent_repository_object = GetFileContent_repository_object_Commit | GetFileContent_repository_object_Blob; +export type GetFileContent_repository_object = + | GetFileContent_repository_object_Commit + | GetFileContent_repository_object_Blob; export interface GetFileContent_repository { __typename: "Repository"; diff --git a/packages/mergebot/src/queries/schema/GetProjectBoardCards.ts b/packages/mergebot/src/queries/schema/GetProjectBoardCards.ts index 2a6026dd9a..c674f82ff5 100644 --- a/packages/mergebot/src/queries/schema/GetProjectBoardCards.ts +++ b/packages/mergebot/src/queries/schema/GetProjectBoardCards.ts @@ -24,7 +24,17 @@ export interface GetProjectBoardCards_repository_projectV2_items_pageInfo { } export interface GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldDateValue { - __typename: "ProjectV2ItemFieldDateValue" | "ProjectV2ItemFieldIterationValue" | "ProjectV2ItemFieldLabelValue" | "ProjectV2ItemFieldMilestoneValue" | "ProjectV2ItemFieldNumberValue" | "ProjectV2ItemFieldPullRequestValue" | "ProjectV2ItemFieldRepositoryValue" | "ProjectV2ItemFieldReviewerValue" | "ProjectV2ItemFieldTextValue" | "ProjectV2ItemFieldUserValue"; + __typename: + | "ProjectV2ItemFieldDateValue" + | "ProjectV2ItemFieldIterationValue" + | "ProjectV2ItemFieldLabelValue" + | "ProjectV2ItemFieldMilestoneValue" + | "ProjectV2ItemFieldNumberValue" + | "ProjectV2ItemFieldPullRequestValue" + | "ProjectV2ItemFieldRepositoryValue" + | "ProjectV2ItemFieldReviewerValue" + | "ProjectV2ItemFieldTextValue" + | "ProjectV2ItemFieldUserValue"; } export interface GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue { @@ -35,7 +45,9 @@ export interface GetProjectBoardCards_repository_projectV2_items_nodes_fieldValu name: string | null; } -export type GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName = GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldDateValue | GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue; +export type GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName = + | GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldDateValue + | GetProjectBoardCards_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue; export interface GetProjectBoardCards_repository_projectV2_items_nodes { __typename: "ProjectV2Item"; diff --git a/packages/mergebot/src/queries/schema/GetProjectColumns.ts b/packages/mergebot/src/queries/schema/GetProjectColumns.ts index 61e171141e..0224e7e1d6 100644 --- a/packages/mergebot/src/queries/schema/GetProjectColumns.ts +++ b/packages/mergebot/src/queries/schema/GetProjectColumns.ts @@ -24,7 +24,17 @@ export interface GetProjectColumns_repository_projectV2_items_pageInfo { } export interface GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldDateValue { - __typename: "ProjectV2ItemFieldDateValue" | "ProjectV2ItemFieldIterationValue" | "ProjectV2ItemFieldLabelValue" | "ProjectV2ItemFieldMilestoneValue" | "ProjectV2ItemFieldNumberValue" | "ProjectV2ItemFieldPullRequestValue" | "ProjectV2ItemFieldRepositoryValue" | "ProjectV2ItemFieldReviewerValue" | "ProjectV2ItemFieldTextValue" | "ProjectV2ItemFieldUserValue"; + __typename: + | "ProjectV2ItemFieldDateValue" + | "ProjectV2ItemFieldIterationValue" + | "ProjectV2ItemFieldLabelValue" + | "ProjectV2ItemFieldMilestoneValue" + | "ProjectV2ItemFieldNumberValue" + | "ProjectV2ItemFieldPullRequestValue" + | "ProjectV2ItemFieldRepositoryValue" + | "ProjectV2ItemFieldReviewerValue" + | "ProjectV2ItemFieldTextValue" + | "ProjectV2ItemFieldUserValue"; } export interface GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue { @@ -39,7 +49,9 @@ export interface GetProjectColumns_repository_projectV2_items_nodes_fieldValueBy optionId: string | null; } -export type GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName = GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldDateValue | GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue; +export type GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName = + | GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldDateValue + | GetProjectColumns_repository_projectV2_items_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue; export interface GetProjectColumns_repository_projectV2_items_nodes { __typename: "ProjectV2Item"; diff --git a/packages/mergebot/src/queries/schema/PR.ts b/packages/mergebot/src/queries/schema/PR.ts index bf91711eb9..f048a47222 100644 --- a/packages/mergebot/src/queries/schema/PR.ts +++ b/packages/mergebot/src/queries/schema/PR.ts @@ -3,7 +3,15 @@ // @generated // This file was automatically generated and should not be edited. -import { CommentAuthorAssociation, MergeableState, PullRequestState, PullRequestReviewState, CheckConclusionState, CheckStatusState, StatusState } from "./graphql-global-types"; +import { + CommentAuthorAssociation, + MergeableState, + PullRequestState, + PullRequestReviewState, + CheckConclusionState, + CheckStatusState, + StatusState, +} from "./graphql-global-types"; // ==================================================== // GraphQL query operation: PR @@ -86,7 +94,62 @@ export interface PR_repository_pullRequest_commitIds { } export interface PR_repository_pullRequest_timelineItems_nodes_AddedToMergeQueueEvent { - __typename: "AddedToMergeQueueEvent" | "AddedToProjectEvent" | "AssignedEvent" | "AutoMergeDisabledEvent" | "AutoMergeEnabledEvent" | "AutoRebaseEnabledEvent" | "AutoSquashEnabledEvent" | "AutomaticBaseChangeFailedEvent" | "AutomaticBaseChangeSucceededEvent" | "BaseRefChangedEvent" | "BaseRefDeletedEvent" | "BaseRefForcePushedEvent" | "ClosedEvent" | "CommentDeletedEvent" | "ConnectedEvent" | "ConvertToDraftEvent" | "ConvertedNoteToIssueEvent" | "ConvertedToDiscussionEvent" | "CrossReferencedEvent" | "DemilestonedEvent" | "DeployedEvent" | "DeploymentEnvironmentChangedEvent" | "DisconnectedEvent" | "HeadRefDeletedEvent" | "HeadRefForcePushedEvent" | "HeadRefRestoredEvent" | "IssueComment" | "LabeledEvent" | "LockedEvent" | "MarkedAsDuplicateEvent" | "MentionedEvent" | "MergedEvent" | "MilestonedEvent" | "PinnedEvent" | "PullRequestCommit" | "PullRequestCommitCommentThread" | "PullRequestReview" | "PullRequestReviewThread" | "PullRequestRevisionMarker" | "ReferencedEvent" | "RemovedFromMergeQueueEvent" | "RemovedFromProjectEvent" | "RenamedTitleEvent" | "ReviewDismissedEvent" | "ReviewRequestRemovedEvent" | "ReviewRequestedEvent" | "SubscribedEvent" | "TransferredEvent" | "UnassignedEvent" | "UnlabeledEvent" | "UnlockedEvent" | "UnmarkedAsDuplicateEvent" | "UnpinnedEvent" | "UnsubscribedEvent" | "UserBlockedEvent"; + __typename: + | "AddedToMergeQueueEvent" + | "AddedToProjectEvent" + | "AssignedEvent" + | "AutoMergeDisabledEvent" + | "AutoMergeEnabledEvent" + | "AutoRebaseEnabledEvent" + | "AutoSquashEnabledEvent" + | "AutomaticBaseChangeFailedEvent" + | "AutomaticBaseChangeSucceededEvent" + | "BaseRefChangedEvent" + | "BaseRefDeletedEvent" + | "BaseRefForcePushedEvent" + | "ClosedEvent" + | "CommentDeletedEvent" + | "ConnectedEvent" + | "ConvertToDraftEvent" + | "ConvertedNoteToIssueEvent" + | "ConvertedToDiscussionEvent" + | "CrossReferencedEvent" + | "DemilestonedEvent" + | "DeployedEvent" + | "DeploymentEnvironmentChangedEvent" + | "DisconnectedEvent" + | "HeadRefDeletedEvent" + | "HeadRefForcePushedEvent" + | "HeadRefRestoredEvent" + | "IssueComment" + | "LabeledEvent" + | "LockedEvent" + | "MarkedAsDuplicateEvent" + | "MentionedEvent" + | "MergedEvent" + | "MilestonedEvent" + | "PinnedEvent" + | "PullRequestCommit" + | "PullRequestCommitCommentThread" + | "PullRequestReview" + | "PullRequestReviewThread" + | "PullRequestRevisionMarker" + | "ReferencedEvent" + | "RemovedFromMergeQueueEvent" + | "RemovedFromProjectEvent" + | "RenamedTitleEvent" + | "ReviewDismissedEvent" + | "ReviewRequestRemovedEvent" + | "ReviewRequestedEvent" + | "SubscribedEvent" + | "TransferredEvent" + | "UnassignedEvent" + | "UnlabeledEvent" + | "UnlockedEvent" + | "UnmarkedAsDuplicateEvent" + | "UnpinnedEvent" + | "UnsubscribedEvent" + | "UserBlockedEvent"; } export interface PR_repository_pullRequest_timelineItems_nodes_ReopenedEvent { @@ -129,7 +192,11 @@ export interface PR_repository_pullRequest_timelineItems_nodes_MovedColumnsInPro projectColumnName: string; } -export type PR_repository_pullRequest_timelineItems_nodes = PR_repository_pullRequest_timelineItems_nodes_AddedToMergeQueueEvent | PR_repository_pullRequest_timelineItems_nodes_ReopenedEvent | PR_repository_pullRequest_timelineItems_nodes_ReadyForReviewEvent | PR_repository_pullRequest_timelineItems_nodes_MovedColumnsInProjectEvent; +export type PR_repository_pullRequest_timelineItems_nodes = + | PR_repository_pullRequest_timelineItems_nodes_AddedToMergeQueueEvent + | PR_repository_pullRequest_timelineItems_nodes_ReopenedEvent + | PR_repository_pullRequest_timelineItems_nodes_ReadyForReviewEvent + | PR_repository_pullRequest_timelineItems_nodes_MovedColumnsInProjectEvent; export interface PR_repository_pullRequest_timelineItems { __typename: "PullRequestTimelineItemsConnection"; @@ -528,7 +595,17 @@ export interface PR_repository_pullRequest_projectItems_nodes_project { } export interface PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldDateValue { - __typename: "ProjectV2ItemFieldDateValue" | "ProjectV2ItemFieldIterationValue" | "ProjectV2ItemFieldLabelValue" | "ProjectV2ItemFieldMilestoneValue" | "ProjectV2ItemFieldNumberValue" | "ProjectV2ItemFieldPullRequestValue" | "ProjectV2ItemFieldRepositoryValue" | "ProjectV2ItemFieldReviewerValue" | "ProjectV2ItemFieldTextValue" | "ProjectV2ItemFieldUserValue"; + __typename: + | "ProjectV2ItemFieldDateValue" + | "ProjectV2ItemFieldIterationValue" + | "ProjectV2ItemFieldLabelValue" + | "ProjectV2ItemFieldMilestoneValue" + | "ProjectV2ItemFieldNumberValue" + | "ProjectV2ItemFieldPullRequestValue" + | "ProjectV2ItemFieldRepositoryValue" + | "ProjectV2ItemFieldReviewerValue" + | "ProjectV2ItemFieldTextValue" + | "ProjectV2ItemFieldUserValue"; } export interface PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field_ProjectV2Field { @@ -543,7 +620,9 @@ export interface PR_repository_pullRequest_projectItems_nodes_fieldValueByName_P id: string; } -export type PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field = PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field_ProjectV2Field | PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field_ProjectV2SingleSelectField; +export type PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field = + | PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field_ProjectV2Field + | PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field_ProjectV2SingleSelectField; export interface PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue { __typename: "ProjectV2ItemFieldSingleSelectValue"; @@ -557,7 +636,9 @@ export interface PR_repository_pullRequest_projectItems_nodes_fieldValueByName_P field: PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue_field; } -export type PR_repository_pullRequest_projectItems_nodes_fieldValueByName = PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldDateValue | PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue; +export type PR_repository_pullRequest_projectItems_nodes_fieldValueByName = + | PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldDateValue + | PR_repository_pullRequest_projectItems_nodes_fieldValueByName_ProjectV2ItemFieldSingleSelectValue; export interface PR_repository_pullRequest_projectItems_nodes { __typename: "ProjectV2Item"; diff --git a/packages/mergebot/src/run.ts b/packages/mergebot/src/run.ts index ce713d9eca..414c64485d 100755 --- a/packages/mergebot/src/run.ts +++ b/packages/mergebot/src/run.ts @@ -155,7 +155,10 @@ const start = async function () { console.log(`Cleaning up closed PRs in "${name}"`); for (const id of ids) { const info = await runQueryToGetPRForCardId(id); - await deleteObject(id, info === undefined ? "???" : (info.state === "CLOSED" || info.state === "MERGED") ? undefined : "#" + info.number); + await deleteObject( + id, + info === undefined ? "???" : info.state === "CLOSED" || info.state === "MERGED" ? undefined : "#" + info.number, + ); } } if (failures.length) {