Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
Severity 3 - Minor
-
100
-
8
-
Description
Issue Summary
When a plan has been downgraded from Premium to Free if any repositories have premium features branch restrictions, it is not possible to update branch restrictions.
Steps to Reproduce
1. The customer is on the PREMIUM plan and using some of the premium features in repository branch restrictions.
Premium Features:
- Reset approvals when the source branch is modified
- Prevent a merge with unresolved merge checks
2. The customer downgrades the plan to FREE.
3. Try updating the branch restrictions in any of the repositories which already had premium branch restrictions.
4. You will get a 400 error as below:
Status Code: 400 {"type": "error", "error": {"message": "premium merge checks cannot be enabled without a premium plan"}}
Expected Results
The premium permissions or checks need to be removed when the plan has been downgraded to FREE and there should not be any issues while updating existing branch permissions.
Actual Results
The below exception is thrown in the log file:
Status Code: 400 {"type": "error", "error": {"message": "premium merge checks cannot be enabled without a premium plan"}}
Workaround
- Use API to get the branch restriction ID for the kind "enforce_merge_checks" and delete the branch restriction rule using this API. <OR>
- The existing branch restriction needs to be removed and a new branch restriction needs to be added.