potiuk commented on code in PR #31451:
URL: https://github.com/apache/airflow/pull/31451#discussion_r1199847604


##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -765,3 +777,29 @@ def affected_providers_list_as_string(self) -> str | None:
         if affected_providers == "ALL_PROVIDERS":
             return _ALL_PROVIDERS_LIST
         return " ".join(sorted(affected_providers))
+
+    @cached_property
+    def runs_on(self) -> str:
+        if self._github_repository == APACHE_AIRFLOW_GITHUB_REPOSITORY:
+            if self._github_event in [GithubEvents.SCHEDULE, 
GithubEvents.PUSH]:
+                return RUNS_ON_SELF_HOSTED_RUNNER
+            if not self._github_token:
+                get_console().print(
+                    "\n[error]ERROR: Needs GitHub token to determine if it 
runs on self-hosted runner."
+                )
+                get_console().print(
+                    "\n[info]You can generate run at "
+                    
"https://github.com/settings/tokens/new?description=Read%20Org&scopes=read:org\n";
+                )
+                sys.exit(1)
+            from github import Github
+
+            gh = Github(self._github_token)

Review Comment:
   Unfortunately, we have no permissions in the actions to read the list :(, I 
needed to re-hardcode it.



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