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)