Octokit protect_branch function missing pull request review functionality
The Repositories protect_branch function supports the following parameters and options:
Parameters:
repo (Integer, String, Hash, Repository) — A GitHub repository.
branch (String) — Branch name
options (Hash) (defaults to: {}) — a customizable set of options
Options Hash (options):
:required_status_checks (Hash) — If not null, the following keys are required:
:include_admins [boolean] Enforce required status checks for repository administrators.
:strict [boolean] Require branches to be up to date before merging.
:contexts [Array] The list of status checks to require in order to merge into this branch
:restrictions (Hash) — If not null, the following keys are required: :users [Array] The list of user logins with push access
:teams [Array] The list of team slugs with push access.
Teams and users restrictions are only available for organization-owned repositories.
The actual branches api which that api mimics, supports more. Here is their listed example of available parameters:
{
"required_status_checks": {
"strict": true,
"contexts": [
"continuous-integration/travis-ci"
]
},
"required_pull_request_reviews": {
"dismissal_restrictions": {
"users": [
"octocat"
],
"teams": [
"justice-league"
]
},
"dismiss_stale_reviews": true,
"require_code_owner_reviews": true
},
"enforce_admins": true,
"restrictions": {
"users": [
"octocat"
],
"teams": [
"justice-league"
]
}
}
Currently, the entire "required_pull_request_reviews" section is missing from octokit.
@charlottestjohn this seems like a documentation fix to me, would you mind opening a PR to make these changes?
Thanks!
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!