예제 #1
0
def add_milestones_with_no_issues(milestones):
    output = milestones.copy()
    resp = requests.get(c.get_milestone_url(v._CONFIG_), auth=c.get_basic_auth_credentials(v._CONFIG_))
    if resp.status_code == 200:
        empty_milestones = [m for m in simplejson.loads(resp.content) if m['open_issues'] == 0]
        for ms in empty_milestones:
            output[(ms['number'], ms['title'], ms['description'], ms['due_on'])] = []
    else:
        print 'Unexpected reponse'
    return output
예제 #2
0
def add_milestones_with_no_issues(milestones):
    output = milestones.copy()
    resp = requests.get(c.get_milestone_url(v._CONFIG_),
                        auth=c.get_basic_auth_credentials(v._CONFIG_))
    if resp.status_code == 200:
        empty_milestones = [
            m for m in simplejson.loads(resp.content) if m['open_issues'] == 0
        ]
        for ms in empty_milestones:
            output[(ms['number'], ms['title'], ms['description'],
                    ms['due_on'])] = []
    else:
        print 'Unexpected reponse'
    return output
예제 #3
0
def main2():
    try:
        c.setup('roadmap.md')
        resp = requests.get(c.get_milestone_url(v._CONFIG_), auth=c.get_basic_auth_credentials(v._CONFIG_))
        if resp.status_code == 200:
            fmt.h1('Technology Roadmap')
            milestones = simplejson.loads(resp.content)
            for milestone in milestones:
                write_milestone(milestone)
            print 'Done.'
        else:
            print 'Unexpected reponse'
            print 'Status: %s' % resp.status_code
    finally:
        c.teardown()
예제 #4
0
def main2():
    try:
        c.setup('roadmap.md')
        resp = requests.get(c.get_milestone_url(v._CONFIG_),
                            auth=c.get_basic_auth_credentials(v._CONFIG_))
        if resp.status_code == 200:
            fmt.h1('Technology Roadmap')
            milestones = simplejson.loads(resp.content)
            for milestone in milestones:
                write_milestone(milestone)
            print 'Done.'
        else:
            print 'Unexpected reponse'
            print 'Status: %s' % resp.status_code
    finally:
        c.teardown()