def getLastReleaseTag(): content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases') for l in content: draft = l["draft"] tag = l["tag_name"] if str(draft) != 'True' and tag.startswith("v2"): return tag[1:]
def lastReleaseId(tag): content = ghApiClient.readUrl('repos/swagger-api/swagger-parser/releases') for l in content: draft = l["draft"] draft_tag = l["tag_name"] if str(draft) == 'True' and tag == draft_tag: return l["id"]
def lastReleaseId(tag): content = ghApiClient.readUrl('repos/frantuma/nagger-core/releases') for l in content: draft = l["draft"] draft_tag = l["tag_name"] if str(draft) == 'True' and tag == draft_tag: return l["id"]
def allPulls(releaseDate): result = "" baseurl = "https://api.github.com/repos/swagger-api/swagger-core/pulls/" content = ghApiClient.readUrl( 'repos/swagger-api/swagger-core/pulls?state=closed&base=master&per_page=100' ) for l in content: stripped = l["url"][len(baseurl):] mergedAt = l["merged_at"] if mergedAt is not None: if datetime.strptime(mergedAt, '%Y-%m-%dT%H:%M:%SZ') > releaseDate: if not l['title'].startswith("bump snap"): result += '\n' result += "* " + l['title'] + " (#" + stripped + ")" return result
def getReleases(): content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases') return content
def lastReleaseDate(tag): content = ghApiClient.readUrl( 'repos/swagger-api/swagger-core/releases/tags/' + tag) publishedAt = content["published_at"] return datetime.strptime(publishedAt, '%Y-%m-%dT%H:%M:%SZ')
def getReleases(): content = ghApiClient.readUrl('repos/frantuma/nagger-core/releases') return content