Files
PyGithub/github/tests/ReplayData/Branch.setUp.txt
T
Steve Kowalik 171cc567ae Update Branch Protection to current GitHub API
The Branch protection API has been radically changed by GitHub, add new
methods to Branch reflecting it. Branch protection methods are now
called on the Branch object itself, rather than awkwardly hanging off
the Repository object and requiring branch names to be passed in.

This adds an over-arching methods to get, edit and remove protection
entirely, as well as fine-grained methods for getting, setting and
dropping certain aspects of branch protection, as well as three new
objects to encompass querying those aspects.

This also destroys Repository.protect_branch(), the endpoint has been
removed. The old-style protection attributes on Branch have also been
removed to force users onto the new API, since they are still sent, but
no longer populated.

Fixes #586
2018-08-15 12:45:47 +10:00

56 lines
5.3 KiB
Plaintext

https
GET
api.github.com
None
/user
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4967'), ('content-length', '801'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"27524c635501121933f4f78c95b1945a"'), ('date', 'Fri, 18 May 2012 20:12:19 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"owned_private_repos":5,"collaborators":0,"type":"User","hireable":false,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","public_gists":1,"company":"Criteo","bio":"","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","private_gists":5,"plan":{"collaborators":1,"private_repos":5,"name":"micro","space":614400},"public_repos":11,"followers":13,"login":"jacquev6","blog":"http://vincent-jacques.net","email":"vincent@vincent-jacques.net","disk_usage":16852,"html_url":"https://github.com/jacquev6","name":"Vincent Jacques","total_private_repos":5,"created_at":"2010-07-09T06:10:06Z","location":"Paris, France","id":327146,"following":24}
https
GET
api.github.com
None
/repos/jacquev6/PyGithub
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4966'), ('content-length', '1097'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"c5eec74d4b76b80283636a8efe1a132c"'), ('date', 'Fri, 18 May 2012 20:12:20 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"svn_url":"https://github.com/jacquev6/PyGithub","has_wiki":false,"has_issues":true,"updated_at":"2012-05-18T05:29:54Z","forks":2,"homepage":"http://vincent-jacques.net/PyGithub","git_url":"git://github.com/jacquev6/PyGithub.git","url":"https://api.github.com/repos/jacquev6/PyGithub","clone_url":"https://github.com/jacquev6/PyGithub.git","open_issues":17,"fork":false,"ssh_url":"git@github.com:jacquev6/PyGithub.git","pushed_at":"2012-05-18T05:18:16Z","size":304,"private":false,"has_downloads":true,"watchers":13,"html_url":"https://github.com/jacquev6/PyGithub","owner":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"name":"PyGithub","permissions":{"pull":true,"admin":true,"push":true},"mirror_url":null,"language":"Python","description":"Python library implementing the full Github API v3","created_at":"2012-02-25T12:53:47Z","id":3544490}
https
GET
api.github.com
None
/repos/jacquev6/PyGithub/branches/topic/RewriteWithGeneratedCode
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '330'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"2dada6dafd332016bcdf06e42487e520"'), ('date', 'Thu, 10 May 2012 13:56:55 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"name":"topic/RewriteWithGeneratedCode","commit":{"sha":"1292bf0e22c796e91cc3d6e24b544aece8c21f2a","url":"https://api.github.com/repos/jacquev6/PyGithub/commits/1292bf0e22c796e91cc3d6e24b544aece8c21f2a"},"protected":false,"protection_url":"https://api.github.com/repos/jacquev6/PyGithub/branches/topic/RewriteWithGeneratedCode/protection"}
https
GET
api.github.com
None
/repos/jacquev6/PyGithub/branches/integrations
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '395'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"46245273100a0cfb1e8339a2cfb122da"'), ('date', 'Mon, 07 May 2018 12:40:05 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"name":"integrations","commit":{"sha":"d60943db8c9ae6ca1f9400d378a757e6f281dbde","url":"https://api.github.com/repos/jacquev6/PyGithub/commits/d60943db8c9ae6ca1f9400d378a757e6f281dbde"},"protected":true,"protection":{"enabled":true,"required_status_checks":{"contexts":["foo/bar"]},"enforce_admins":true},"protection_url":"https://api.github.com/repos/jacquev6/PyGithub/branches/integrations/protection"}
https
GET
api.github.com
None
/repos/PyGithub/PyGithub/branches/master
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '395'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"46245273100a0cfb1e8339a2cfb122da"'), ('date', 'Sun, 13 May 2018 15:15:25 GMT'), ('content-type', 'application/json; charset=utf-8')]
{"name":"master","commit":{"sha":"d60943db8c9ae6ca1f9400d378a757e6f281dbde","url":"https://api.github.com/repos/PyGithub/PyGithub/commits/d60943db8c9ae6ca1f9400d378a757e6f281dbde"},"protected":true,"protection":{"enabled":true},"protection_url":"https://api.github.com/repos/PyGithub/PyGithub/branches/master/protection"}