diff --git a/checks/evaluation/branch_protection_test.go b/checks/evaluation/branch_protection_test.go index 13b44cb70d2..9e14c5e9fe2 100644 --- a/checks/evaluation/branch_protection_test.go +++ b/checks/evaluation/branch_protection_test.go @@ -35,6 +35,7 @@ func testScore(branch *clients.BranchRef, codeownersFiles []string, dl checker.D return computeFinalScore([]levelScore{score}, dl) } +// TODO: order of tests to have progressive scores. func TestIsBranchProtected(t *testing.T) { t.Parallel() trueVal := true @@ -49,6 +50,7 @@ func TestIsBranchProtected(t *testing.T) { expected scut.TestReturn }{ { + // TODO: Naming is inconsistent. We should change this to make it score 0. name: "Nothing is enabled", expected: scut.TestReturn{ Error: nil, diff --git a/clients/githubrepo/branches.go b/clients/githubrepo/branches.go index 14cbdd49c35..17261f432c1 100644 --- a/clients/githubrepo/branches.go +++ b/clients/githubrepo/branches.go @@ -323,6 +323,7 @@ func (handler *branchesHandler) getBranch(branch string) (*clients.BranchRef, er return branchRef, nil } +// TODO: Move these two functions to below the GetBranchRefFrom functions, the single place they're used. func copyAdminSettings(src *branchProtectionRule, dst *clients.BranchProtectionRule) { copyBoolPtr(src.IsAdminEnforced, &dst.EnforceAdmins) copyBoolPtr(src.RequireLastPushApproval, &dst.RequireLastPushApproval)