| OLD | NEW |
| 1 package rietveld | 1 package rietveld |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "encoding/json" | 4 "encoding/json" |
| 5 "fmt" | 5 "fmt" |
| 6 "net/http" | 6 "net/http" |
| 7 "net/url" | 7 "net/url" |
| 8 "regexp" | 8 "regexp" |
| 9 "sort" | 9 "sort" |
| 10 "strings" | 10 "strings" |
| 11 "time" | 11 "time" |
| 12 ) | 12 ) |
| 13 | 13 |
| 14 import ( | 14 import ( |
| 15 "github.com/skia-dev/glog" | 15 "github.com/skia-dev/glog" |
| 16 "go.skia.org/infra/go/util" | 16 "go.skia.org/infra/go/util" |
| 17 ) | 17 ) |
| 18 | 18 |
| 19 var ( | 19 var ( |
| 20 committedIssueRegexp []string = []string{ | 20 committedIssueRegexp []string = []string{ |
| 21 "Committed patchset #[0-9]+ \\((id:)?[0-9]+\\) as [0-9a-f]{2,40}
", | 21 "Committed patchset #[0-9]+ \\((id:)?[0-9]+\\) as [0-9a-f]{2,40}
", |
| 22 "Committed patchset #[0-9]+ \\((id:)?[0-9]+\\)", |
| 22 "Committed patchset #[0-9]+", | 23 "Committed patchset #[0-9]+", |
| 23 "Change committed as [0-9]+", | 24 "Change committed as [0-9]+", |
| 24 } | 25 } |
| 25 ) | 26 ) |
| 26 | 27 |
| 27 // Issue contains information about a Rietveld issue. | 28 // Issue contains information about a Rietveld issue. |
| 28 type Issue struct { | 29 type Issue struct { |
| 29 CC []string | 30 CC []string |
| 30 Closed bool | 31 Closed bool |
| 31 Committed bool | 32 Committed bool |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 return Issue{}, fmt.Errorf("Failed to load details for issue %d:
%v", issue, err) | 183 return Issue{}, fmt.Errorf("Failed to load details for issue %d:
%v", issue, err) |
| 183 } | 184 } |
| 184 return res, nil | 185 return res, nil |
| 185 } | 186 } |
| 186 | 187 |
| 187 // New returns a new Rietveld instance. | 188 // New returns a new Rietveld instance. |
| 188 func New(url string) Rietveld { | 189 func New(url string) Rietveld { |
| 189 url = strings.TrimRight(url, "/") | 190 url = strings.TrimRight(url, "/") |
| 190 return Rietveld{url} | 191 return Rietveld{url} |
| 191 } | 192 } |
| OLD | NEW |