Github user ptgoetz commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2250#discussion_r131180727
  
    --- Diff: dev-tools/release_notes.py ---
    @@ -0,0 +1,107 @@
    +#!/usr/bin/env python
    +
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +"""Usage: release_notes.py <version> > RELEASE_NOTES.html
    +
    +Generates release notes for a Storm release by generating an HTML doc 
containing some introductory information about the
    + release with links to the Storm docs followed by a list of issues 
resolved in the release. The script will fail if it finds
    + any unresolved issues still marked with the target release. You should 
run this script after either resolving all issues or
    + moving outstanding issues to a later release.
    +
    +"""
    +
    +from jira import JIRA
    +import itertools, sys
    +
    +if len(sys.argv) < 2:
    +    print >>sys.stderr, "Usage: release_notes.py <version>"
    +    sys.exit(1)
    +
    +version = sys.argv[1]
    +
    +JIRA_BASE_URL = 'https://issues.apache.org/jira'
    +MAX_RESULTS = 100 # This is constrained for cloud instances so we need to 
fix this value
    +
    +def get_issues(jira, query, **kwargs):
    +    """
    +    Get all issues matching the JQL query from the JIRA instance. This 
handles expanding paginated results for you. Any additional keyword arguments 
are forwarded to the JIRA.search_issues call.
    +    """
    +    results = []
    +    startAt = 0
    +    new_results = None
    +    while new_results == None or len(new_results) == MAX_RESULTS:
    +        new_results = jira.search_issues(query, startAt=startAt, 
maxResults=MAX_RESULTS, **kwargs)
    +        results += new_results
    +        startAt += len(new_results)
    +    return results
    +
    +def issue_link(issue):
    +    return "%s/browse/%s" % (JIRA_BASE_URL, issue.key)
    +
    +
    +if __name__ == "__main__":
    +    apache = JIRA(JIRA_BASE_URL)
    --- End diff --
    
    `apache = JiraRepo(JIRA_BASE_URL)` ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to