Created
February 26, 2013 22:04
-
-
Save kylestev/5042696 to your computer and use it in GitHub Desktop.
Shows all the issues currently assigned to a specified user in Redmine.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import sys | |
from urllib2 import urlopen | |
REDMINE_URL = 'https://code.osuosl.org/issues.json?assigned_to_id=%s' | |
def main(): | |
if len(sys.argv) != 2: | |
return 'Please add your Redmine user id' | |
resp = urlopen(REDMINE_URL % sys.argv[1]) | |
issues = json.loads(resp.read()) | |
if not 'issues' in issues: | |
return 'No issues found' | |
print '%s issues\n' % len(issues['issues']) | |
for issue in issues['issues']: | |
print 'URL: https://code.osuosl.org/issues/%s' % issue['id'] | |
print issue['project']['name'], '-', issue['subject'] | |
print 'Author:', issue['author']['name'] | |
print 'Category:', issue['category']['name'] | |
print 'Priority:', issue['priority']['name'] | |
print 'Status:', issue['status']['name'] | |
print '######\n' | |
if __name__ == '__main__': | |
sys.exit(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment