[ 
https://issues.apache.org/jira/browse/AIRFLOW-3521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722126#comment-16722126
 ] 

ASF GitHub Bot commented on AIRFLOW-3521:
-----------------------------------------

kaxil closed pull request #4300: [AIRFLOW-3521] Fetch more than 50 items in 
`airflow-jira compare` script
URL: https://github.com/apache/incubator-airflow/pull/4300
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/dev/airflow-jira b/dev/airflow-jira
index 27ec991914..5625654c19 100755
--- a/dev/airflow-jira
+++ b/dev/airflow-jira
@@ -65,9 +65,22 @@ GIT_LOG_FORMAT = '%x1f'.join(GIT_LOG_FORMAT) + '%x1e'
 def get_jiras_for_version(version):
     asf_jira = jira.client.JIRA({'server': JIRA_API_BASE})
 
-    return asf_jira.search_issues(
-        'PROJECT={} and fixVersion={}'.format(PROJECT, version)
-    )
+    start_at = 0
+    page_size = 50
+    while True:
+        results = asf_jira.search_issues(
+            'PROJECT={} and fixVersion={}'.format(PROJECT, version),
+            maxResults=page_size,
+            startAt=start_at,
+        )
+
+        for r in results:
+            yield r
+
+        if len(results) < page_size:
+            break
+
+        start_at += page_size
 
 
 def get_merged_issues(version):


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Airflow Jira Compare script is limited to 50 items
> --------------------------------------------------
>
>                 Key: AIRFLOW-3521
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3521
>             Project: Apache Airflow
>          Issue Type: Improvement
>            Reporter: Kaxil Naik
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to