jason810496 commented on code in PR #63968:
URL: https://github.com/apache/airflow/pull/63968#discussion_r2964165503


##########
scripts/ci/prek/check_execution_api_versions.py:
##########
@@ -23,32 +23,35 @@
 # ///
 from __future__ import annotations
 
+import json
 import os
 import subprocess
 import sys
+import tempfile
+from pathlib import Path
 
 from common_prek_utils import console
 
 DATAMODELS_PREFIX = 
"airflow-core/src/airflow/api_fastapi/execution_api/datamodels/"
 VERSIONS_PREFIX = 
"airflow-core/src/airflow/api_fastapi/execution_api/versions/"
+TARGET_BRANCH = "main"
 
 
 def get_changed_files_ci() -> list[str]:
-    """Get changed files in a CI environment by comparing against the target 
branch."""
-    target_branch = os.environ.get("GITHUB_BASE_REF") or "main"
+    """Get changed files in CI by comparing against main."""
     fetch_result = subprocess.run(
-        ["git", "fetch", "origin", target_branch],
+        ["git", "fetch", "origin", TARGET_BRANCH],

Review Comment:
   Do we need to take upstream as source of truth instead of origin? As the 
main branch of the origin might be outdated (at least I for me, I only make 
sure my local main is up to date with upstream and I don't sync the main branch 
of my fork often).
   
   ```suggestion
           ["git", "fetch", "upstream", TARGET_BRANCH],
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to