Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin for GitHub #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ganeshhubale
Copy link

@ganeshhubale ganeshhubale commented Aug 28, 2018

Fixed #13

  • List all open PRs made by particular user to particular repo. on GitHub

Signed-off-by: ganeshhubale [email protected]

@bhavin192
Copy link
Contributor

bhavin192 commented Aug 29, 2018

@ganeshhubale the #13 was solved already by PR #21, I forgot to close that issue. The issue your PR fixes is different, can you please create a new issue mentioning details of the bug your PR solves?

@ganeshhubale
Copy link
Author

I have created new issue #30

github_url = "https://api.github.com"
r = requests.get(os.path.join(github_url, "repos", username, repository, "pulls"))
r = requests.get(os.path.join(github_url, "repos", repository, "pulls"))
js = json.loads(r.content)
for i in range(0, len(js)):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here js is a list. We can iterate over items in a list without range(). Then this for loop would be:

    for pull in js:
        if username == pull['user']['login']:
            if 'title' in pull.keys():
                list_of_pull_requests.append(pull['title'])

Signed-off-by: ganeshhubale <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants