meel-ayush commented on code in PR #77119:
URL: https://github.com/apache/airflow/pull/77119#discussion_r4770203292


##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -2741,6 +2744,25 @@ def _is_self_hosted_label_approved(self) -> bool:
     def has_migrations(self) -> bool:
         return any([file.startswith("airflow-core/src/airflow/migrations/") 
for file in self._files])
 
+    @cached_property
+    def has_added_or_renamed_files(self) -> bool:
+        if self._commit_ref is None:
+            return True
+        base: str
+        if self._fork_push:
+            if self._fork_changes_truncated or not self._fork_merge_base:
+                return True
+            base = self._fork_merge_base
+        elif self._selective_tests_on_push and self._github_event == 
GithubEvents.PUSH:
+            if not self._push_base_commit:
+                return True
+            base = self._push_base_commit
+        else:
+            base = f"{self._commit_ref}^"
+        cmd = ["git", "diff", "--name-only", "--diff-filter=A", 
"--no-renames", base, self._commit_ref]
+        result = run_command(cmd, check=False, capture_output=True, text=True)

Review Comment:
   Added cwd=AIRFLOW_ROOT_PATH and updated the test assertion.



-- 
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