branch.edit_protection(
enforce_admins=desired_protection_settings["enforce_admins"],
required_linear_history=desired_protection_settings["required_linear_history"],
# required_conversation_resolution=desired_protection_settings["required_conversation_resolution"], # Not supported in this version
lock_branch=desired_protection_settings["lock_branch"],
allow_fork_syncing=desired_protection_settings["allow_fork_syncing"],
users_bypass_pull_request_allowances=desired_protection_settings["users_bypass_pull_request_allowances"],
teams_bypass_pull_request_allowances=desired_protection_settings["teams_bypass_pull_request_allowances"],
apps_bypass_pull_request_allowances=desired_protection_settings["apps_bypass_pull_request_allowances"],
block_creations=desired_protection_settings["block_creations"],
require_last_push_approval=desired_protection_settings["require_last_push_approval"]
)
I am having issues with parameters in edit_protection. I started writing a script that needs to update some protection parameters but it seems like I’m constantly getting errors that some fields that should be allowed(checked the documentation for edit_protection) like required_conversation_resolution, required_linear_history, allow_deletions.
Does anyone have a clue why?
If reviewed documentation, rewrote the code several times, debugged but no luck. Maybe I’m missing something.