jedcunningham commented on code in PR #31792:
URL: https://github.com/apache/airflow/pull/31792#discussion_r1223266981
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -776,7 +778,21 @@ 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 self._github_actor in COMMITTERS and USE_PUBLIC_RUNNERS_LABEL
not in self._pr_labels:
+ actor = self._github_actor
+ if self._github_event in (GithubEvents.PULL_REQUEST,
GithubEvents.PULL_REQUEST_TARGET):
+ try:
+ actor =
self._github_context_dict["event"]["pull_request"]["user"]["login"]
+ get_console().print(
+ f"[warning]The {actor} retrieved as actor from
GITHUB_CONTEXT's"
+ f" event.pull_request.user.login[/]"
+ )
+ except Exception as e:
+ get_console().print(f"[warning]Exception when reading user
login: {e}[/]")
+ get_console().print(
+ f"[info]Could not find the actor from pull request, "
+ f"falling back to the actor who triggered the PR
{actor}:[/]"
Review Comment:
```suggestion
f"falling back to the actor who triggered the PR:
{actor}[/]"
```
Maybe?
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -776,7 +778,21 @@ 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 self._github_actor in COMMITTERS and USE_PUBLIC_RUNNERS_LABEL
not in self._pr_labels:
+ actor = self._github_actor
+ if self._github_event in (GithubEvents.PULL_REQUEST,
GithubEvents.PULL_REQUEST_TARGET):
+ try:
+ actor =
self._github_context_dict["event"]["pull_request"]["user"]["login"]
+ get_console().print(
+ f"[warning]The {actor} retrieved as actor from
GITHUB_CONTEXT's"
Review Comment:
```suggestion
f"[info]{actor} retrieved as actor from
GITHUB_CONTEXT's"
```
2 things:
- Don't need "the" here, even if "The potiuk retrieved as actor" does sounds
good :)
- Shouldn't this be an info, not warning?
--
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]