diff --git a/internal/github/action_test.go b/internal/github/action_test.go index bdc8f4e..7831a7d 100644 --- a/internal/github/action_test.go +++ b/internal/github/action_test.go @@ -155,6 +155,7 @@ func TestLabelChecks(t *testing.T) { if len(tc.expectedStderr) > 0 { tc.expectedStderr = "::error:: " + tc.expectedStderr } + setPullRequestNumber(tc.prNumber) setPrefixMode(tc.prefixMode) tc.specifyChecks() @@ -269,6 +270,7 @@ func checkLabels() (int, *bytes.Buffer, *bytes.Buffer) { stdout := &bytes.Buffer{} stderr := &bytes.Buffer{} a := Action{} + return a.CheckLabels(stdout, stderr), stdout, stderr } diff --git a/internal/github/pullrequest/labels.go b/internal/github/pullrequest/labels.go index 0e52532..5ed4514 100644 --- a/internal/github/pullrequest/labels.go +++ b/internal/github/pullrequest/labels.go @@ -29,6 +29,7 @@ func (l Labels) HasAllOf(specified []string, prefixMode bool) (bool, string) { if prefixMode { return false, "The label checker does not support prefix checking with `all_of`, as that is not a logical combination." //nolint:lll } + return l.hasXof(specified, "all", prefixMode) }