shurcooL / Go-Package-Store

An app that displays updates for the Go packages in your GOPATH.
MIT License
900 stars 29 forks source link

Add Gitiles presenter. #59

Closed dmitshur closed 8 years ago

dmitshur commented 8 years ago

This would be a good first contribution for anyone interested.

Currently, Go packages hosted by Gitiles have no presenter:

image

That package is hosted at https://code.googlesource.com/gocloud.

According to some Gitiles API docs I found at https://code.google.com/p/gitiles/issues/detail?id=47 and http://www.chromium.org/developers/change-logs, it should be quite doable. Probably want to hit this endpoint:

https://code.googlesource.com/gocloud/+log?format=JSON

)]}'
{
  "log": [
    {
      "commit": "a4c7c3139dc2772ad6c3bb73d0a9236a79063f8c",
      "tree": "68fc07b7dc3b4f4dfefedd1bda6d412ace6f8727",
      "parents": [
        "54626cdede306a92797a87ff48a5634d780ed8a5"
      ],
      "author": {
        "name": "Gary Elliott",
        "email": "garyelliott@google.com",
        "time": "Fri Jun 24 09:27:02 2016 -0400"
      },
      "committer": {
        "name": "Chris Broadfoot",
        "email": "cbro@google.com",
        "time": "Fri Jun 24 18:24:42 2016 +0000"
      },
      "message": "readme: use correct capitalization for Bigtable\n\nChange-Id: I719e3e19df5f1bec1209988bf96ae49842a0afa2\nReviewed-on: https://code-review.googlesource.com/5040\nReviewed-by: Chris Broadfoot \u003ccbro@google.com\u003e\n"
    },
    {
      "commit": "54626cdede306a92797a87ff48a5634d780ed8a5",
      "tree": "d52020c59102e8075bbcd79beebd9e2e18c3ca31",
      "parents": [
        "1f78490befb2922b5b4d46a8bc4baa03b301f87b"
      ],
      "author": {
        "name": "Ingo Oeser",
        "email": "nightlyone@googlemail.com",
        "time": "Tue Jun 07 22:07:57 2016 +0200"
      },
      "committer": {
        "name": "Michael McGreevy",
        "email": "mcgreevy@golang.org",
        "time": "Fri Jun 24 12:08:52 2016 +0000"
      },
      "message": "bigquery: implement missing streaming options\n\nAdded currently possible streaming options:\n* TableTemplateSuffix\n* SkipInvalidRows\n* IgnoreUnknownValues as UploadIgnoreUnknownValues\n\nFixes #273\n\nChange-Id: I290681e9cf393d3347ddb5f24585e81340f6db39\nReviewed-on: https://code-review.googlesource.com/4950\nReviewed-by: Michael McGreevy \u003cmcgreevy@golang.org\u003e\n"
    },
...

Use the github.com/shurcooL/Go-Package-Store/presenter/github presenter as a starting point or example.

dmitshur commented 8 years ago

I have a working implementation of this.

image

The google.golang.org/api and google.golang.org/cloud repos are coming from Gitiles remote (i.e., https://code.googlesource.com/google-api-go-client and https://code.googlesource.com/gocloud).