此版本的 GitHub Enterprise Server 将于以下日期停止服务 2026-03-17. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持。
REST API 现已经过版本控制。 有关详细信息,请参阅“关于 API 版本控制”。
分支的 REST API 终结点及其设置
使用 REST API 修改分支及其保护设置。
- 分支的 REST API 终结点
 - 受保护分支的 REST API 终结点
- Get branch protection
 - Update branch protection
 - Delete branch protection
 - Get admin branch protection
 - Set admin branch protection
 - Delete admin branch protection
 - Get pull request review protection
 - Update pull request review protection
 - Delete pull request review protection
 - Get commit signature protection
 - Create commit signature protection
 - Delete commit signature protection
 - Get status checks protection
 - Update status check protection
 - Remove status check protection
 - Get all status check contexts
 - Add status check contexts
 - Set status check contexts
 - Remove status check contexts
 - Get access restrictions
 - Delete access restrictions
 - Get apps with access to the protected branch
 - Add app access restrictions
 - Set app access restrictions
 - Remove app access restrictions
 - Get teams with access to the protected branch
 - Add team access restrictions
 - Set team access restrictions
 - Remove team access restrictions
 - Get users with access to the protected branch
 - Add user access restrictions
 - Set user access restrictions
 - Remove user access restrictions