You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/gerritbot/internal/rules: skip checking the wiki repo to minimize friction
Core team reviewers usually seem to approve wiki CLs and PRs without
asking for any changes to a commit message even if it does not conform
to general CL guidelines for the main Go repos.
For example, CL 587895 was approved with the commit title of:
add "cue" as a well-known struct tag
(without a leading "wiki:" or leading page name or similar).
This seems fine, including I think the general intent was to keep the
reviews very lightweight when the wiki content was moved
(golang/go#61940).
Currently, GerritBot is too picky with wiki PRs.
This CL therefore updates GerritBot to avoid flagging any issues with
wiki PRs. (An alternative would be to skip just some rules, but it
seems simpler to skip all).
Partly in case there is a later decision to start flagging wiki PRs,
while we are here we update the packageExample and usesTracker functions
to be more specific about the wiki repo (which won't have any effect
right now because the wiki repo is now ignored).
Fixesgolang/go#65281
Change-Id: I7f678a9f997f35fa048b78aab1ee4a6d808b4ec6
Reviewed-on: https://go-review.googlesource.com/c/build/+/640135
Reviewed-by: Dmitri Shuralyov <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Copy file name to clipboardExpand all lines: cmd/gerritbot/internal/rules/rules_test.go
+6
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,12 @@ The commit title and commit message body come from the GitHub PR title and descr
46
46
The commit title and commit message body come from the GitHub PR title and description, and must be edited in the GitHub web interface (not via git). For instructions, see [here](https://go.dev/wiki/GerritBot/#how-does-gerritbot-determine-the-final-commit-message). For guidelines on commit messages for the Go project, see [here](https://go.dev/doc/contribute#commit_messages).
47
47
`,
48
48
},
49
+
{
50
+
title: `A bad wiki commit title we allow`, // We ignore the wiki repo.
51
+
repo: "wiki",
52
+
body: "A bad body we allow",
53
+
want: "",
54
+
},
49
55
{
50
56
title: goodCommitTitle,
51
57
body: "This commit body is missing a bug reference.",
0 commit comments