cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdion...@apache.org
Subject [1/2] git commit: updated refs/heads/4.4 to 62b9ae1
Date Mon, 01 Dec 2014 02:19:26 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 9b76342a2 -> 62b9ae1fc


jira-changes.py: generate content for CHANGES.md from jira filter


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8b94aa29
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8b94aa29
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8b94aa29

Branch: refs/heads/4.4
Commit: 8b94aa29337a46d601966e95db0134eee7938c14
Parents: 9b76342
Author: Pierre-Luc Dion <pdion891@apache.org>
Authored: Sun Nov 30 18:17:21 2014 -0500
Committer: Pierre-Luc Dion <pdion891@apache.org>
Committed: Sun Nov 30 21:18:15 2014 -0500

----------------------------------------------------------------------
 tools/jira/jira-changes.py | 66 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b94aa29/tools/jira/jira-changes.py
----------------------------------------------------------------------
diff --git a/tools/jira/jira-changes.py b/tools/jira/jira-changes.py
new file mode 100755
index 0000000..50f14f4
--- /dev/null
+++ b/tools/jira/jira-changes.py
@@ -0,0 +1,66 @@
+#!/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.
+#
+###############################################################################
+#
+# Collect Jira issues from a filter and format the output for CHANGES.md
+# Output content into console, does not write into file.
+#
+###############################################################################
+"""jira.py: Output jira issues from https://issues.apache.org/jira into RST format for Apche
CloudStack Release-Notes.
+
+Usage:
+  jira.py FILTERID -u USERNAME -p PASSWORD
+  jira.py (-h | --help)
+  jira.py --version
+
+Options:
+  -h --help     Show this screen.
+  --version     Show version.
+
+"""
+from docopt import docopt
+import requests
+import json
+import sys
+import pprint
+
+
+if __name__ == '__main__':
+    arguments = docopt(__doc__, version='jira.py 2.0')
+
+filterurl='https://issues.apache.org/jira/rest/api/2/filter/' + arguments['FILTERID']
+
+
+r=requests.get(filterurl, auth=(arguments['USERNAME'],arguments['PASSWORD']))
+rlist=r.json()['searchUrl']
+
+get_all=requests.get(rlist, auth=(arguments['USERNAME'],arguments['PASSWORD'])).json()
+count=get_all['total']
+
+#print count
+n, m = divmod(count, 50)
+
+for i in range(n+1):
+
+    issueslist=requests.get(rlist+'&startAt='+str(i*50), auth=(arguments['USERNAME'],arguments['PASSWORD'])).json()['issues']
+
+    for issue in issueslist:
+        '''assignee=issue['fields']['assignee']['displayName']
+           reporter=issue['fields']['reporter']['displayName']
+        '''
+        print '['+ issue['key'] + '](https://issues.apache.org/jira/browse/' + issue['key']
+ ') | ' + issue['fields']['summary'][:80] + '...'


Mime
View raw message