Files
PyGithub/tests/ReplayData/Branch.testAddUserPushRestrictions.txt
Steve KowalikandJonas Maurus 3e3d8c54ab Fix Branch's push restriction API (#1290)
The current API for changing user and teams push restrictions is
brittle, and flat out incorrect when it comes to adding members. Break
the API, but replace it with one that is correct.

Co-Authored-By: Jonas Maurus <jonas-github@maurus.net>
2019-11-22 20:49:58 +11:00

22 lines
3.6 KiB
Plaintext

https
POST
api.github.com
None
/repos/PyGithub/PyGithub/branches/master/protection/restrictions/users
{'Authorization': 'Basic login_and_password_removed', 'Content-Type': 'application/json', 'User-Agent': 'PyGithub/Python'}
["sfdye"]
200
[('status', '200 OK'), ('x-ratelimit-remaining', '4994'), ('content-length', '0'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"81ba94a48ad867b26d48c023ac584f43"'), ('date', 'Sun, 13 May 2018 11:06:07 GMT'), ('content-type', 'application/json; charset=utf-8')]
''
https
GET
api.github.com
None
/repos/PyGithub/PyGithub/branches/master/protection/restrictions/users
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
None
200
[('x-runtime-rack', '0.033407'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('x-oauth-scopes', 'public_repo, repo:status'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', 'W/"f972722557f6bbc814f109abae4df24e"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('status', '200 OK'), ('x-ratelimit-remaining', '4995'), ('x-github-media-type', 'github.v3; format=json'), ('access-control-expose-headers', 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('transfer-encoding', 'chunked'), ('x-github-request-id', '9946:55F2:20CF9A0:423578E:5AF580B7'), ('date', 'Fri, 13 May 2018 11:07:40 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'"), ('content-encoding', 'gzip'), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-frame-options', 'deny'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1526042267')]
[{"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},{"login":"sfdye","id":343369,"avatar_url":"https://avatars2.githubusercontent.com/u/343369?v=4","gravatar_id":"","url":"https://api.github.com/users/sfdye","html_url":"https://github.com/sfdye","followers_url":"https://api.github.com/users/sfdye/followers","following_url":"https://api.github.com/users/sfdye/following{/other_user}","gists_url":"https://api.github.com/users/sfdye/gists{/gist_id}","starred_url":"https://api.github.com/users/sfdye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfdye/subscriptions","organizations_url":"https://api.github.com/users/sfdye/orgs","repos_url":"https://api.github.com/users/sfdye/repos","events_url":"https://api.github.com/users/sfdye/events{/privacy}","received_events_url":"https://api.github.com/users/sfdye/received_events","type":"User","site_admin":false}]