diff --git a/.github/scripts/revoke-ready-to-merge-workflow-contract_test.py b/.github/scripts/revoke-ready-to-merge-workflow-contract_test.py index 334fb22875..2d8df0ca8d 100644 --- a/.github/scripts/revoke-ready-to-merge-workflow-contract_test.py +++ b/.github/scripts/revoke-ready-to-merge-workflow-contract_test.py @@ -41,13 +41,18 @@ class RevokeReadyToMergeWorkflowContractTest(unittest.TestCase): # @covers AC-CI-MERGE-APPROVAL-001.2 def test_reads_and_independently_cleans_active_merge_states(self) -> None: - self.assertIn("autoMergeRequest { id }", self.workflow) + self.assertIn("autoMergeRequest { enabledAt }", self.workflow) + self.assertNotIn("autoMergeRequest { id }", self.workflow) self.assertIn("mergeQueueEntry { id }", self.workflow) self.assertIn("disablePullRequestAutoMerge", self.workflow) self.assertIn("dequeuePullRequest", self.workflow) self.assertIn("pullRequestId: $id", self.workflow) self.assertIn("input: { id: $id }", self.workflow) - self.assertIn("currentPullRequest.autoMergeRequest?.id", self.workflow) + self.assertIn( + "currentPullRequest.autoMergeRequest ? currentPullRequest.id : null", + self.workflow, + ) + self.assertNotIn("currentPullRequest.autoMergeRequest?.id", self.workflow) self.assertIn("currentPullRequest.mergeQueueEntry?.id", self.workflow) self.assertIn("attemptCleanup(\n 'auto-merge',", self.workflow) self.assertIn("attemptCleanup(\n 'merge queue',", self.workflow) @@ -73,7 +78,7 @@ class RevokeReadyToMergeWorkflowContractTest(unittest.TestCase): queue_mutation = self.workflow.index("dequeuePullRequest") queue_block = self.workflow[queue_mutation - 200 : queue_mutation + 300] - self.assertIn("{ id: currentPullRequest.id }", queue_block) + self.assertIn("{ id }", queue_block) # @covers AC-CI-MERGE-APPROVAL-001.3 def test_event_label_snapshot_gates_all_cleanup(self) -> None: diff --git a/.github/workflows/revoke-ready-to-merge.yml b/.github/workflows/revoke-ready-to-merge.yml index 9f010766b1..4df1de2941 100644 --- a/.github/workflows/revoke-ready-to-merge.yml +++ b/.github/workflows/revoke-ready-to-merge.yml @@ -239,7 +239,7 @@ jobs: } } `, - { id }, + { id: currentPullRequest.id }, ), ); @@ -255,7 +255,7 @@ jobs: } } `, - { id: currentPullRequest.id }, + { id }, ), ); }