You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Lee-W (via GitHub)" <gi...@apache.org> on 2023/07/21 10:29:39 UTC

[GitHub] [airflow] Lee-W commented on a diff in pull request #32735: improve performance of pr script in dev/stats

Lee-W commented on code in PR #32735:
URL: https://github.com/apache/airflow/pull/32735#discussion_r1270517157


##########
dev/stats/get_important_pr_candidates.py:
##########
@@ -388,23 +388,13 @@ def main(
         console.print(f"Finding best candidate PRs between {date_start} and {date_end}.")
         g = Github(github_token)
         repo = g.get_repo("apache/airflow")
-        pulls = repo.get_pulls(state="closed", sort="created", direction="desc")
+        commits = repo.get_commits(since=date_start, until=date_end)
+        pulls = []
+        for commit in commits:
+            for pull in commit.get_pulls():
+                pulls.append(pull)

Review Comment:
   nitpick
   ```suggestion
           pulls = [
               pull 
               for commit in commits
               for pull in commit.get_pulls()
           ]
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org