From f8062764d11dd7e1d26c9986d18ca96b4e3d2c2d Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sat, 23 May 2026 21:11:45 +0800 Subject: [PATCH] Gate legacy AI review workflow --- .github/workflows/ai_review.yml | 2 +- tests/test_monthly_publish_workflow_config.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ai_review.yml b/.github/workflows/ai_review.yml index fa056be..0be33a6 100644 --- a/.github/workflows/ai_review.yml +++ b/.github/workflows/ai_review.yml @@ -11,7 +11,7 @@ name: AI Monthly Review jobs: ai-review: - if: contains(github.event.issue.labels.*.name, 'monthly-review') || inputs.issue_number != '' + if: vars.LEGACY_AI_REVIEW_ENABLED == 'true' && (contains(github.event.issue.labels.*.name, 'monthly-review') || inputs.issue_number != '') runs-on: ubuntu-latest permissions: contents: read diff --git a/tests/test_monthly_publish_workflow_config.py b/tests/test_monthly_publish_workflow_config.py index be49df5..642ad92 100644 --- a/tests/test_monthly_publish_workflow_config.py +++ b/tests/test_monthly_publish_workflow_config.py @@ -55,6 +55,7 @@ def test_ai_review_workflow_supports_dispatch_and_comment_posting(self) -> None: self.assertIn("workflow_dispatch:", workflow) self.assertIn("issue_number:", workflow) + self.assertIn("vars.LEGACY_AI_REVIEW_ENABLED == 'true'", workflow) self.assertIn("id-token: write", workflow) self.assertIn("Load review issue context", workflow) self.assertIn("api.github.com/repos/{repo}/issues/{issue_number}", workflow)