https
POST
api.github.com
None
/repos/PyGithub/PyGithub/rulesets
{'Authorization': 'token private_token_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
{"name": "new rule set", "target": "branch", "enforcement": "active", "bypass_actors": [{"actor_id": 5, "actor_type": "RepositoryRole", "bypass_mode": "always"}], "conditions": {"ref_name": {"exclude": [], "include": ["refs/heads/master", "refs/heads/main"]}}, "rules": [{"type": "deletion"}, {"type": "non_fast_forward"}, {"type": "creation"}]}
201
[('Date', 'Fri, 31 Jan 2025 19:59:12 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '716'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"006f0a5e7d6ee1158b01211cbdec83d1b8a7aa9de0368c3c54f764e320378573"'), ('github-authentication-token-expiration', '2025-02-21 11:42:01 +0100'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('x-accepted-github-permissions', 'administration=write'), ('x-github-api-version-selected', '2022-11-28'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4996'), ('X-RateLimit-Reset', '1738357096'), ('X-RateLimit-Used', '4'), ('X-RateLimit-Resource', 'core'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '0'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('Server', 'github.com'), ('X-GitHub-Request-Id', '70C7:6C6A9:D99F63:E090C6:679D2B90')]
{"id":3490869,"name":"new rule set","target":"branch","source_type":"Repository","source":"PyGithub/PyGithub","enforcement":"active","conditions":{"ref_name":{"exclude":[],"include":["refs/heads/master", "refs/heads/main"]}},"rules":[{"type":"deletion"},{"type":"non_fast_forward"},{"type":"creation"}],"node_id":"RRS_lACqUmVwb3NpdG9yec43HleVzgA1RDU","created_at":"2025-01-31T20:59:12.515+01:00","updated_at":"2025-01-31T20:59:12.515+01:00","bypass_actors":[{"actor_id":5,"actor_type":"RepositoryRole","bypass_mode":"always"}],"current_user_can_bypass":"always","_links":{"self":{"href":"https://api.github.com/repos/PyGithub/PyGithub/rulesets/3490869"},"html":{"href":"https://github.com/PyGithub/PyGithub/rules/3490869"}}}
