Граф коммитов

20 Коммитов

Автор SHA1 Сообщение Дата
Damien Neil c4345a7cbf maintner: use more recent protobuf module
Switch from the older github.com/golang/protobuf module
to the newer google.golang.org/protobuf one.

Mostly a no-op, but this will change the formatting of
text protos a bit.

Change-Id: I2ac90ad5f882c6429ab7c81d55496adbb1008542
Reviewed-on: https://go-review.googlesource.com/c/build/+/617275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-10-02 21:01:05 +00:00
Dmitri Shuralyov faf0b5959a all: upgrade go-github v17.0.0+incompatible to v48.1.0
Upgrade a few remaining uses of the very old v17.0.0+incompatible major
version of go-github to the newer v48.1.0 that's already used elsewhere.

Change-Id: I79316b1b32574b11e87828ae9ac1a8ab952154f2
Reviewed-on: https://go-review.googlesource.com/c/build/+/591735
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2024-06-10 22:02:10 +00:00
Brad Fitzpatrick c65a6d729b maintner: don't generate no-op github issue mutations on empty bodies
Fixes golang/go#35985

Change-Id: I45a10ce99bf047c600d72db2dc1428235103322f
Reviewed-on: https://go-review.googlesource.com/c/build/+/209967
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-12-05 17:34:07 +00:00
Gergely Brautigam c41ee31c2e maintner: increase test coverage for github.go and maintner.go
This change set increases the coverage around Event parsing and handling in github.go.

Fixes golang/go#30122

Change-Id: Id0349be892ba14820bdbe2132ed4acd092902f84
GitHub-Last-Rev: cc57f3d073
GitHub-Pull-Request: golang/build#16
Reviewed-on: https://go-review.googlesource.com/c/build/+/157437
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-10-02 16:22:21 +00:00
Dmitri Shuralyov 398adf893f maintner: add GerritCL.CommitAtVersion method
Previous versions were available via GerritProject.remote, but that
symbol is not exported and can't be used by callers of this package.

Update test for go-github API change in google/go-github#816, so the
tests can pass locally. Since go-github isn't vendored, it's understood
that the latest upstream version is targeted.

Change-Id: Ib4b78abacb19d73f95df2215b4a248a24376ae10
Reviewed-on: https://go-review.googlesource.com/95136
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-19 17:27:22 +00:00
Yann Salaün b60cce42b1 maintner: rename GithubRepoID to GitHubRepoID
Make the naming a little more consistent.

Change-Id: Icd40d3818c490fa0bd1562a924a684d79c17c4a4
Reviewed-on: https://go-review.googlesource.com/59590
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-09-25 02:33:15 +00:00
Brad Fitzpatrick 1a1ef8e92a maintner: support for updating corpus in-place from its mutation source
And update godata package docs.

Change-Id: I781e50b20dfa1494fa7d65400cff8a2637ecf9e0
Reviewed-on: https://go-review.googlesource.com/42174
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-04-30 21:30:16 +00:00
Kevin Burke 022bf90f00 maintner: fix un-initialized github panic
Previously processGithubIssueMutation called initGithub, but
processGithubMutation did not, so if your on-disk mutation file had
a GithubMutation before a GithubIssueMutation, c.github would be nil
and Initialize() would panic.

Call initGithub from processGithubMutation and add a test to protect
against regressions.

Change-Id: Ie706fa04cb8ea87c2e0259dbee024c0005f0523f
Reviewed-on: https://go-review.googlesource.com/41298
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-21 05:53:41 +00:00
Brad Fitzpatrick 1eecef36c8 cmd/gopherbot: mention gerrit CLs on Github (cl2issue port)
This adds indexing of Github mentions to maintner, then adds gopherbot
functionality to say "CL https://golang.org/cl/NNNN mentions this issue."
on Github when a Gerrit CL references it.

Also the start of the cherry-pick milestone bot which needs the same
Github issue reference tracking. But that part's only barely started
and still disabled.

Fixes golang/go#18818
Updates golang/go#19776

Change-Id: Ie5f7f6845317a7c39cc36d7397c7539bf99c3f92
Reviewed-on: https://go-review.googlesource.com/39352
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-18 05:39:29 +00:00
Brad Fitzpatrick 2ceb757052 maintner: remove Corpus.StartLogging, rename processMutation to addMutation
StartLogging seemed unnecessary. And processMutation was special in
that it added to the log. The other dozen or so methods named
processMutation or similar were just about process mutations already
in the log. Disambiguate.

Change-Id: I4b4bf46c3ae7996ad5f7e06de5456f4c06b6bb40
Reviewed-on: https://go-review.googlesource.com/38658
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-25 04:01:36 +00:00
Kevin Burke 92164ac215 maintner: initial gerrit support
Pass --watch-gerrit on the command line to watch a Gerrit project. We
initialize a Git repository in $HOME/var/maintnerd/<gerrit-url>, then
fetch all metadata related to that project, and store it in the
Corpus.

Change-Id: I47a8b5e5af2ae1b99c97cc756790c8e21465e8ee
Reviewed-on: https://go-review.googlesource.com/38421
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-24 21:34:29 +00:00
Brad Fitzpatrick b3a49f9ff3 maintner, maintner/godata, maintner/gostats: start library-itizing maintner
This renames some types to be exported (automated using gorename), and
then adds a package "godata" to get the Go project's current
maintner.Corpus (currently a stub implementation). It then adds the
start of a "gostats" command using "godata", moving some temporary
stuff from maintnerd in the process.

Change-Id: I31f7d7af6f60892317a9f55ae44106543bfb599d
Reviewed-on: https://go-review.googlesource.com/38377
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-20 21:25:43 +00:00
Brad Fitzpatrick f34b7233b7 maintner: add GithubIssueEvent proto, githubEvent.Proto method, tests
More work on syncing issue events.

This adds a new GithubIssueEvent proto type, adds ways to go both from
and to the in-memory githubEvent type, and cleans up the event tests
added in 8927fdda9.

The next commit will wire it up to the syncing.

Change-Id: Ibdd9759dab432c6eaa4c37becfbb31f1ebf8f5b9
Reviewed-on: https://go-review.googlesource.com/38370
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-20 02:25:45 +00:00
Brad Fitzpatrick 8927fdda90 maintner: sync all github issue attributes, start of Events, Labels, Milestones
More remains, but this is as good of a checkpoint as any.

Change-Id: I63f6b13508562143159e92d78fc4ef60070342ae
Reviewed-on: https://go-review.googlesource.com/38163
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-17 05:45:49 +00:00
Kevin Burke 1fe9f274d2 maintner: fix tests
One of the recent commits changed the nil value for Assignees when
a new githubIssue gets created.

I used github.com/kr/pretty to determine the diff after the
reflect.DeepEqual failed; it's pretty useful and would be handy to
have every time, though it would be another dependency to add.

Change-Id: I5d71296a6caf1776fd95c9991d798dc848152aaa
Reviewed-on: https://go-review.googlesource.com/38162
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-15 15:36:33 +00:00
Kevin Burke 8cb8408587 maintner: add more fields
This should comprise most of the fields that are needed by the
existing godash/devapp app. Will wire up the Milestone code in
another commit.

Change-Id: I83c399afebce5865dd03c00e295be5a19e1e36b2
Reviewed-on: https://go-review.googlesource.com/37753
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-06 22:36:29 +00:00
Kevin Burke 9fd5f30c83 maintner: flush protobufs to disk
For now, open and close the file each time we write a protobuf. We can improve
the performance in the future as necessary.

Change-Id: Idcc75df5aa59a604c0c0aeeff6ea0e0ff0f2db8f
Reviewed-on: https://go-review.googlesource.com/37626
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-01 19:33:50 +00:00
Kevin Burke d71f595a20 maintner: start adding issue bodies to the corpus
When we get an issue from Github, add the issue and associated
details to the Corpus. Check whether the `Updated` timestamp on an
issue is newer than the one we have in the Corpus; if the timestamp
is the same, we can stop processing since we are sorting by the
updated date and no older issues will have new data.

If the mutation changes the Corpus, add it to an array of Mutations
that we will eventually flush to disk.

Adds a helper function to convert a github.Issue into a
maintpb.Mutation - this way we can reuse the logic for adding data to
the Corpus. Adds some more tests around data processing.

Change-Id: I9475e293941784179420ca7b638917943be1f29e
Reviewed-on: https://go-review.googlesource.com/37490
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-28 18:56:24 +00:00
Kevin Burke 7ebe3f6394 maintner: wire up maintnerd and PollGithub
Now you can actually pass repos to maintnerd and tell a Corpus to
track/store them. Adds a hook to "catch up" a given repo, though it's
unimplemented at the moment, so all requests hit the API. Also only
Github is implemented.

Change-Id: Ib074c02437d6530fc8d57dd433486c05cd75ee64
Reviewed-on: https://go-review.googlesource.com/37299
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-24 21:54:39 +00:00
Brad Fitzpatrick 927294fed0 maintner: process a github new issue mutation, start of tests
Change-Id: I92b9d5b8ddce6b48ede67e5d5ec97c1a07d17e06
Reviewed-on: https://go-review.googlesource.com/36901
Reviewed-by: Kevin Burke <kev@inburke.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-13 16:14:50 +00:00