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
Add description to Organizations #838
Add description to Organizations #838
Conversation
200 | ||
[('status', '200 OK'), ('x-ratelimit-remaining', '4992'), ('content-length', '833'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"fe61098c87e054abfa5626e6a76bbcbd"'), ('date', 'Sat, 26 May 2012 20:50:35 GMT'), ('content-type', 'application/json; charset=utf-8')] | ||
{"public_gists":0,"type":"Organization","disk_usage":112,"private_gists":0,"public_repos":2,"url":"https://api.github.com/orgs/BeaverSoftware","total_private_repos":0,"plan":{"private_repos":0,"name":"free","space":307200},"blog":"http://vincent-jacques.net","avatar_url":"https://secure.gravatar.com/avatar/d563e337cac2fdc644e2aaaad1e23266?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","owned_private_repos":0,"collaborators":0,"company":"Company edited by PyGithub","login":"BeaverSoftware","email":"BeaverSoftware2@vincent-jacques.net","followers":0,"name":"Name edited by PyGithub","created_at":"2012-02-09T19:20:12Z","location":"Location edited by PyGithub","id":1424031,"billing_email":"BeaverSoftware2@vincent-jacques.net","following":0,"html_url":"https://github.com/BeaverSoftware"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if editing directly the replay fixture is the way to do it, as I am not familiar with the test framework being used by this project...
Travis tests have failedHey @jacquerie, 1st Buildpython setup.py test
4th Buildpython setup.py test
|
@jacquerie Sorry about this, the failing test is from the master branch introduced in this commit, I have fixed it now. Can you please pull the change from master? |
* Add support for getting / replacing an Organization's description.
Sure, done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@jacquerie Thanks! |
As mentioned in https://developer.github.com/v3/orgs/, an organization also has a description. This PR adds this attribute to the `Organization` class, as well as modifies its `edit` method so that it's possible to update it. I noticed too late the [`add_attribute.py` script](https://github.com/PyGithub/PyGithub/blob/8ae2bcb1e6f96beeec99fbbcf00f4af46bb38cde/scripts/add_attribute.py), so I did my modifications by hand, but I noticed that the output of the script and the style used for all the other attributes are different. I preferred the style that is prevalent in the file, rather than the output of the script.
As mentioned in https://developer.github.com/v3/orgs/, an organization also has a description. This PR adds this attribute to the
Organization
class, as well as modifies itsedit
method so that it's possible to update it.I noticed too late the
add_attribute.py
script, so I did my modifications by hand, but I noticed that the output of the script and the style used for all the other attributes are different. I preferred the style that is prevalent in the file, rather than the output of the script.