You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/12/15 11:50:23 UTC
[GitHub] kaxil closed pull request #4300: [AIRFLOW-3521] Fetch more than 50
items in `airflow-jira compare` script
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:
users@infra.apache.org
With regards,
Apache Git Services