Пример #1
0
    print
    if len(labels) > 0:
        mutable_issue['labels'] = labels


gh = Github(login_or_token=input("Enter github username: "******"Enter location (<user>/<repo>)",
repo_full_name = 'avocado-framework/avocado-vt'
repo_full_name = input(
    "or blank for '%s': " % repo_full_name).strip() or repo_full_name
print

issues = GithubIssues(gh, repo_full_name)

# Can't directly search for no labels
criteria = {
    'state': 'open',
    'sort': 'updated',
    'direction': 'asc'
}  # updated-asc == oldest first

heading = ("Open, unlabeled issues from %s, oldest-first" % repo_full_name)
print heading
print "-" * len(heading)
print

repo = gh.get_repo(repo_full_name)
labels = ", ".join([label.name for label in repo.get_labels()])
Пример #2
0
# see http://developer.github.com/v3/oauth/#create-a-new-authorization
print("Enter github username:"******"Issue #125: ", end=' ')
# Any issue can be referenced by number
print(issues[125])
end = gh.rate_limiting
print("Requests used: ", start[0] - end[0])
print("Cache hits: %s misses: %s" % (issues.cache_hits, issues.cache_misses))

# Pull requests are treated as issues
issues = GithubIssues(gh, 'avocado-framework/avocado-vt')
start = end
print("Pull #526: ", end=' ')
print(issues[526])
end = gh.rate_limiting
print("Requests used: ", start[0] - end[0])
print("Cache hits: %s misses: %s" % (issues.cache_hits, issues.cache_misses))
Пример #3
0
print "Enter github username:"******"Issue #125: ",
# Any issue can be referenced by number
print issues[125]
end = gh.rate_limiting
print "Requests used: ", start[0] - end[0]
print "Cache hits: %s misses: %s" % (issues.cache_hits, issues.cache_misses)

# Pull requests are treated as issues
issues = GithubIssues(gh, 'autotest/virt-test')
start = end
print "Pull #526: ",
print issues[526]
end = gh.rate_limiting
print "Requests used: ", start[0] - end[0]
print "Cache hits: %s misses: %s" % (issues.cache_hits, issues.cache_misses)