Skip to content

Populates Issue's repository from URL when not in response.#181

Merged
jacquev6 merged 1 commit into
PyGithub:developfrom
stuglaser:develop
Aug 19, 2013
Merged

Populates Issue's repository from URL when not in response.#181
jacquev6 merged 1 commit into
PyGithub:developfrom
stuglaser:develop

Conversation

@stuglaser
Copy link
Copy Markdown
Contributor

Issues created from Repository.get_issue() have their repository field set to None. This pull request manually sets the Issue's repository using the Issue's URL, when the repository has not already been set.

I've also modified the test in tests.Issue.Issue.testAttributes to verify that the repository is correctly set. The modified test does fail if I remove my changes to the library.

@jacquev6
Copy link
Copy Markdown
Member

jacquev6 commented Jul 7, 2013

Thank you for your contribution!

To be honest, I'm not sure about that... Until now, PyGithub never interferes with what is returned by Github API v3. I'll think about it in the next few days.

@stuglaser
Copy link
Copy Markdown
Contributor Author

I certainly see your point. However, it is frustrating that Issue behaves differently depending on where it's returned from.

Anyways, let me know what you decide, and thanks for the project.

@ghost ghost assigned jacquev6 Jul 11, 2013
@jacquev6
Copy link
Copy Markdown
Member

You're right, I'll merge that in next release.

Later, I will try to find a more generic way to help objects know their parents (here, we do repo.get_issue(n), so we already have the repo, and we do a new request to github for this repo)

@jacquev6 jacquev6 merged commit 5b2954e into PyGithub:develop Aug 19, 2013
@jacquev6 jacquev6 mentioned this pull request Aug 21, 2013
jacquev6 added a commit that referenced this pull request Aug 21, 2013
@stuglaser stuglaser added the v1 label Mar 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants