To build the crbot
tool without a cloned repo (assuming that $GOPATH/bin
is
in your $PATH
):
$ go install github.com/google/code-review-bot/cmd/crbot@latest
$ crbot [options]
Or, from a cloned repo:
$ git clone https://github.com/google/code-review-bot.git
$ cd code-review-bot
$ go build ./cmd/crbot
$ ./crbot [options]
Install the mockgen
tool from GoMock:
$ go install github.com/golang/mock/mockgen@v1.6.0
Generate the mocks:
$ go generate ./...
This specific version of the mockgen
tool is what's used in this repo, and
tests will fail if your version generates different code, including comments.
To update the version of the tools used in this repo:
- update the version number in this file (above) as well as in
.github/workflows/main.yml
andgo.mod
(see entry forgithub.com/golang/mock
) to match — note that you should use the same version formockgen
as for thegithub.com/golang/mock
repo to ensure they're mutually-consistent - run
go mod tidy
to update thego.sum
file - run the updated
go install
command above to get newer version ofmockgen
- run the
go generate
command above to regenerate the mocks - run the tests from the top-level of the tree
- commit your changes to this file (
README.md
),go.mod
,go.sum
, andmain.yml
, making sure that the build passes on GitHub Actions before merging the change
Just what you might expect:
$ make test
See CONTRIBUTING.md
for more details.
Apache 2.0; see LICENSE
for more details.
This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.