diff --git a/src/bitbucket.erl b/src/bitbucket.erl index c41fd14..5ee5b72 100644 --- a/src/bitbucket.erl +++ b/src/bitbucket.erl @@ -164,8 +164,7 @@ get_branch_restrictions(ProjectKey, RepoSlug) -> case bitbucket_api:get_branch_restrictions(ProjectKey, RepoSlug) of {ok, Response} -> Values = maps:get(<<"values">>, Response), - {ok, lists:sort([maps:remove(id, X) || - X <- [bec_branch_restriction_t:from_map(V) || V <- Values]])}; + {ok, lists:sort([bec_branch_restriction_t:from_map(V) || V <- Values])}; {error, Reason} -> {error, Reason} end. diff --git a/test/bec_proper_gen.erl b/test/bec_proper_gen.erl index 4dcf482..dc710c0 100644 --- a/test/bec_proper_gen.erl +++ b/test/bec_proper_gen.erl @@ -216,13 +216,20 @@ path() -> %% PR Restrictions %%============================================================================== pr_restrictions() -> - ?LET( {MergeConfig, AllApprovers, AllTasks, Approvers, Builds} - , {merge_config(), bool(), bool(), nat(), nat()} + ?LET( { MergeConfig + , AllApprovers + , AllTasks + , Approvers + , Builds + , UnapproveOnUpdate + } + , {merge_config(), bool(), bool(), nat(), nat(), bool()} , #{ 'merge-config' => MergeConfig , 'required-all-approvers' => AllApprovers , 'required-all-tasks-complete' => AllTasks , 'required-approvers' => Approvers , 'required-successful-builds' => Builds + , 'unapprove-on-update' => UnapproveOnUpdate }). merge_config() ->