From 97f94a0ad52d9029117aaae84f679f02ea88a874 Mon Sep 17 00:00:00 2001 From: Jono Spiro Date: Thu, 21 Jan 2021 21:43:05 -0800 Subject: [PATCH] Fix badly worded error --- internal/check/valid_owner.go | 2 +- .../integration/testdata/TestCheckFailures/owners.golden.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/check/valid_owner.go b/internal/check/valid_owner.go index 2fffa97..34a8e18 100644 --- a/internal/check/valid_owner.go +++ b/internal/check/valid_owner.go @@ -243,7 +243,7 @@ func (v *ValidOwner) validateTeam(ctx context.Context, name string) *validateErr if !teamHasWritePermission() { return newValidateError( - "Team %q cannot review PRs on %q as neither it nor any parent team does not have write permissions.", + "Team %q cannot review PRs on %q as neither it nor any parent team has write permissions.", team, v.orgRepoName) } diff --git a/tests/integration/testdata/TestCheckFailures/owners.golden.txt b/tests/integration/testdata/TestCheckFailures/owners.golden.txt index 6ffa8ca..024a2ef 100644 --- a/tests/integration/testdata/TestCheckFailures/owners.golden.txt +++ b/tests/integration/testdata/TestCheckFailures/owners.golden.txt @@ -22,7 +22,7 @@ [err] line 15: Team "masters" does not have permissions associated with the repository "codeowners-samples". [err] line 15: Team "monarchy" does not have permissions associated with the repository "codeowners-samples". [err] line 15: Team "naturals" does not have permissions associated with the repository "codeowners-samples". - [err] line 15: Team "ninjas" cannot review PRs on "codeowners-samples" as neither it nor any parent team does not have write permissions. + [err] line 15: Team "ninjas" cannot review PRs on "codeowners-samples" as neither it nor any parent team has write permissions. [err] line 15: Team "outliers" does not have permissions associated with the repository "codeowners-samples". [err] line 15: Team "peak-performers" does not have permissions associated with the repository "codeowners-samples". [err] line 15: Team "power" does not have permissions associated with the repository "codeowners-samples". @@ -35,7 +35,7 @@ [err] line 15: Team "titans" does not have permissions associated with the repository "codeowners-samples". [err] line 15: Team "tribe" does not have permissions associated with the repository "codeowners-samples". [err] line 15: Team "united" does not have permissions associated with the repository "codeowners-samples". - [err] line 15: Team "vikings" cannot review PRs on "codeowners-samples" as neither it nor any parent team does not have write permissions. + [err] line 15: Team "vikings" cannot review PRs on "codeowners-samples" as neither it nor any parent team has write permissions. [err] line 15: Team "warriors" does not have permissions associated with the repository "codeowners-samples". [err] line 15: Team "wolf-pack" does not have permissions associated with the repository "codeowners-samples". [err] line 17: Team "not-existing-team" does not exist in organization "gh-codeowners".