Repository: incubator-gobblin Updated Branches: refs/heads/master f1bc746ca -> 58226feb2
[GOBBLIN-569] Address the pylint warnings in github-pr-change-log.py Closes #2434 from SivaMaplelabs/GOBBLIN-569 Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/58226feb Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/58226feb Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/58226feb Branch: refs/heads/master Commit: 58226feb2d7e88cf0a9d209730ccb3377093da79 Parents: f1bc746 Author: SivaMaplelabs <[email protected]> Authored: Tue Sep 4 09:32:19 2018 -0700 Committer: Hung Tran <[email protected]> Committed: Tue Sep 4 09:32:19 2018 -0700 ---------------------------------------------------------------------- maven-sonatype/github-pr-change-log.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/58226feb/maven-sonatype/github-pr-change-log.py ---------------------------------------------------------------------- diff --git a/maven-sonatype/github-pr-change-log.py b/maven-sonatype/github-pr-change-log.py index 15b2026..b06cc56 100755 --- a/maven-sonatype/github-pr-change-log.py +++ b/maven-sonatype/github-pr-change-log.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# pylint: disable=line-too-long # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -33,10 +34,10 @@ # The script should be run as follows "./pull-requests-change-log.py [github-username] [github-password] [starting-pr-number] [ending-pr-number] # For example, to produce the above output the command run was "./pull-requests-change-log.py sahilTakiar [my-password] 900 905" -import requests import sys +import requests for prNumber in range(int(sys.argv[3]), int(sys.argv[4])): - pr = requests.get("https://api.github.com/repos/linkedin/gobblin/pulls/" + str(prNumber), auth=(sys.argv[1], sys.argv[2])).json(); - if "state" in pr.keys() and pr["state"] == "closed" and pr["merged"]: - print "* [] [PR " + str(pr["number"]) + "] " + pr["title"] + pr = requests.get("https://api.github.com/repos/linkedin/gobblin/pulls/" + str(prNumber), auth=(sys.argv[1], sys.argv[2])).json() + if "state" in pr.keys() and pr["state"] == "closed" and pr["merged"]: + print "* [] [PR " + str(pr["number"]) + "] " + pr["title"]
