Skip to content

Commit eee8a5f

Browse files
committed
feat(github-bot): config improvements
1 parent 68aff64 commit eee8a5f

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

contribs/github-bot/internal/config/config.go

+15-7
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,22 @@ func Config(gh *client.GitHub) ([]AutomaticCheck, []ManualCheck) {
3838
{
3939
Description: "Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff",
4040
If: c.FileChanged(gh, "^docs/"),
41-
Then: r.Or(
42-
r.And(
43-
r.AuthorInTeam(gh, "devrels"),
41+
Then: r.And(
42+
r.Or(
43+
r.AuthorInTeam(gh, "tech-staff"),
4444
r.ReviewByTeamMembers(gh, "tech-staff", 1),
4545
),
46-
r.And(
47-
r.AuthorInTeam(gh, "tech-staff"),
46+
r.Or(
47+
r.AuthorInTeam(gh, "devrels"),
4848
r.ReviewByTeamMembers(gh, "devrels", 1),
4949
),
5050
),
5151
},
52+
{
53+
Description: "Must not contain the \"don't merge\" label",
54+
If: c.Label("don't merge"),
55+
Then: r.Never(),
56+
},
5257
}
5358

5459
manual := []ManualCheck{
@@ -59,8 +64,11 @@ func Config(gh *client.GitHub) ([]AutomaticCheck, []ManualCheck) {
5964
},
6065
{
6166
Description: "The pull request description provides enough details",
62-
If: c.Not(c.AuthorInTeam(gh, "core-contributors")),
63-
Teams: Teams{"core-contributors"},
67+
If: c.And(
68+
c.Not(c.AuthorInTeam(gh, "core-contributors")),
69+
c.Not(c.Author("dependabot[bot]")),
70+
),
71+
Teams: Teams{"core-contributors"},
6472
},
6573
{
6674
Description: "Determine if infra needs to be updated before merging",

0 commit comments

Comments
 (0)