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

8 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 3bfcc9bf28 maintner/cmd/maintserve: require golang.org/x/build@latest
Now that a pseudo-version of golang.org/x/build module with maintserve
carved out exists, the module golang.org/x/build/maintner/cmd/maintserve
can depend on it. Do so now.

This is analogous to CL 166857.

Updates golang/go#29935

Change-Id: I661f32336ede26fde5581527959d31d164a00b63
Reviewed-on: https://go-review.googlesource.com/c/build/+/167463
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-13 23:59:55 +00:00
Dmitri Shuralyov 6d820572de maintner/cmd/maintserve: carve out into a separate module
This change creates a new module with the module path
golang.org/x/build/maintner/cmd/maintserve, and moves the maintserve
command into it. This is done by adding a go.mod file in the
maintner/cmd/maintserve directory. As a result, the maintserve command
and its dependencies are removed from this and later pseudo-versions of
the golang.org/x/build module.

This is similar to how the h2demo command was carved out into a separate
module in CL 162822.

The motivation for doing this is that the maintserve command requires a
large number of dependencies for its own use, that no other package in
x/build needs. Even though authors of library modules should not be
requiring x/build, it still happens (see golang/go#29935). So, improve
the situation by moving maintserve into a module separate from x/build,
which in turn significantly reduces the dependencies in x/build.

Updates golang/go#29935

Change-Id: Ic64da32be142fedf6475a11fea787cdfe245e0ce
Reviewed-on: https://go-review.googlesource.com/c/build/+/167461
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-13 23:40:14 +00:00
Dmitri Shuralyov 037bfd7a21 maintner/cmd/maintserve: display Gerrit projects and CLs
This change expands the scope of cmd/maintserve to visualize Gerrit CL
maintner data, in addition to the GitHub repository issue tracker data.

I've needed this recently when investigating golang/go#28318 to check
maintner.GerritHashtags values of various CLs. They are shown as of
e712a6949f.

maintner doesn't have sufficient information to present Gerrit CLs in
full detail, so this does a best effort and displays the available
information. Inline review comments and diffs are not included.

The downside of this change is that it adds new dependencies.
However, they are actively maintained by me.

Updates golang/go#28318

Change-Id: Ie6fe14f95f107e95371ea820af88563e03a6bb2a
Reviewed-on: https://go-review.googlesource.com/c/145258
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-29 17:54:27 +00:00
Dmitri Shuralyov 5e2fb0da4c maintner/cmd/maintserve: update .woff2 MIME type to "font/woff2"
Since February 2017, the proper MIME type is "font/woff" for WOFF 1.0 and
"font/woff2" for WOFF 2.0. Prior to February 2017, the standard MIME type
for WOFF 1.0 was "application/font-woff", but it is now deprecated.

References:

-	https://www.iana.org/assignments/media-types/media-types.xhtml
-	https://tools.ietf.org/html/rfc8081

Change-Id: I8d5c04a9f74a2647197179fde4865b3db2d99708
Reviewed-on: https://go-review.googlesource.com/100435
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-13 20:21:28 +00:00
Dmitri Shuralyov 13b1c06671 maintner/cmd/maintserve: don't count PRs as issues
Pull requests are now in the maintner corpus via *maintner.GitHubIssue.
We don't want to count them as issues, since they're not issues in a
strict sense.

Follows https://golang.org/cl/69590
and ecd998cade.

Change-Id: Ia89e89e263626e661633f888c24070073f6fe567
Reviewed-on: https://go-review.googlesource.com/97797
Run-TryBot: Dmitri Shuralyov <dmitri@shuralyov.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-01 00:32:11 +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
Dmitri Shuralyov 8c6825293e maintner/cmd/maintserve: fix redirect logic
There was a typo in the redirection code, causing invalid logic.
This change fixes it.

Change-Id: I71f1e98fff488689c988eb72a83b37e031d35b87
Reviewed-on: https://go-review.googlesource.com/56251
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-08-18 17:44:22 +00:00
Dmitri Shuralyov 19c1169e30 maintner/cmd/maintserve: add maintserve command
maintserve is a program that serves Go issues over HTTP, so they
can be viewed in a browser. It uses x/build/maintner/godata as
its backing source of data.

Note that it statically embeds all the resources it uses, so it's
possible to use it when offline. During that time, the corpus will
not be able to update, and GitHub user profile pictures won't load.

This is an iteration of an existing command named servegoissues,
with import path github.com/bradfitz/go-issue-mirror/cmd/servegoissues.
That program served the same purpose, but was located in another
repository. It used a "previous generation" approach to having
a corpus of GitHub issues data for Go projects, namely the
github.com/bradfitz/go-issue-mirror/issues package, which used
github.com/bradfitz/issuemirror technology.

The intent of maintserve is to replace servegoissues. It uses
the golang.org/x/build/maintner/godata package as its source of
data, which is built on top of the golang.org/x/build/maintner
technology.

Currently, maintserve has 2 types of pages:

-	Index page, which lists repositories.
-	Issues pages, which display a read-only version of issues.
	This functionality is implemented in external issuesapp package.

By default, maintserve starts as an HTTP server at on port 8080,
so you should visit http://localhost:8080/ in a browser after
running the command. Note that the first run may take a while,
since godata.Get will need to download the entire corprus:

	The initial call to Get will download approximately 350-400 MB
	of data into a directory "golang-maintner" under your operating
	system's user cache directory. Subsequent calls will only
	download what's changed since the previous call.

Helps bradfitz/go-issue-mirror#7.
Depends on shurcooL/issues#5.

Change-Id: I421147df08c6f664afff0e70abb5d6aa6a42b2d5
Reviewed-on: https://go-review.googlesource.com/52932
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-03 19:13:04 +00:00