mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 03:11:09 +00:00
Wraps the parts of the branch protection API that allows the user to require signed commits on a branch. New methods are : * Branch.get_required_signatures : returns true if signed commits are required * Branch.add_required_signatures : adds the requirements for signed commits on a branch * Branch.remove_required_signatures : removes the requirement for signed commits on a branch It uses the API provided on this page : https://developer.github.com/v3/repos/branches/ Since this feature is in [preview](https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures/) I pass the 'Accept application/vnd.github.zzzax-preview+json' header to each request.
12 lines
1.7 KiB
Plaintext
12 lines
1.7 KiB
Plaintext
https
|
|
POST
|
|
api.github.com
|
|
None
|
|
/repos/jacquev6/PyGithub/branches/integrations/protection/required_signatures
|
|
{'Accept': 'application/vnd.github.zzzax-preview+json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
|
None
|
|
200
|
|
[('Server', 'GitHub.com'), ('Date', 'Sun, 21 Oct 2018 18:46:31 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Transfer-Encoding', 'chunked'), ('Status', '200 OK'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4973'), ('X-RateLimit-Reset', '1540150652'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('ETag', 'W/"dd58dd0663dbf118bceffe9dc228747e"'), ('X-OAuth-Scopes', 'admin:gpg_key, admin:public_key, admin:repo_hook, gist, notifications, repo, user, write:discussion'), ('X-Accepted-OAuth-Scopes', ''), ('X-GitHub-Media-Type', 'github.zzzax-preview; 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'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Content-Encoding', 'gzip'), ('X-GitHub-Request-Id', 'AA54:4C24:3031AD3:6A57E17:5BCCC987')]
|
|
{"url":"https://api.github.com/repos/jacquev6/PyGithub/branches/integrations/protection/required_signatures","enabled":true}
|
|
|