Skip to content

Commit

Permalink
bot: single-reviewer for multiple helmrelease/values in same folder (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bpdohall authored Feb 21, 2024
1 parent 3587e92 commit e9e944d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions bot/internal/bot/bot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,16 @@ func TestApproverCount(t *testing.T) {
paths: []string{"lib", "src/*/values.yaml"},
expect: 1,
},
{
desc: "helmrelease files match wildcard",
files: []github.PullRequestFile{
{Name: "src/package/helmrelease-with-suffix.yaml"},
{Name: "src/package/prefix-helmrelease.yaml"},
{Name: "lib/db.go"},
},
paths: []string{"lib", "src/*/*helmrelease*.yaml"},
expect: 1,
},
{
desc: "one file doesn't match wildcard",
files: []github.PullRequestFile{
Expand Down
8 changes: 4 additions & 4 deletions bot/internal/review/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ var (
"deploy/fluxcd/config/*/values.yaml",
"deploy/fluxcd/config/*/*/values.yaml",
"deploy/fluxcd/config/*/*/*/values.yaml",
"deploy/fluxcd/src/platform/*/values.helm.yaml",
"deploy/fluxcd/src/platform/*/helmrelease.yaml",
"deploy/fluxcd/src/platform/*/*/values.helm.yaml",
"deploy/fluxcd/src/platform/*/*/helmrelease.yaml",
"deploy/fluxcd/src/platform/*/*values.helm.yaml",
"deploy/fluxcd/src/platform/*/*helmrelease*.yaml",
"deploy/fluxcd/src/platform/*/*/*values.helm.yaml",
"deploy/fluxcd/src/platform/*/*/*helmrelease*.yaml",
},
}

Expand Down

0 comments on commit e9e944d

Please sign in to comment.