Documentation ¶
Index ¶
Constants ¶
View Source
const ( MONORAIL_BASE_URL_TMPL = "https://monorail-prod.appspot.com/_ah/api/monorail/v1/projects/%s/issues" PROJECT_ANGLE = "angleproject" PROJECT_CHROMIUM = "chromium" PROJECT_PDFIUM = "pdfium" PROJECT_SKIA = "skia" PROJECT_WEBRTC = "webrtc" )
Variables ¶
View Source
var ( // "Constants" REPO_PROJECT_MAPPING = map[string]string{ common.REPO_ANGLE: PROJECT_ANGLE, common.REPO_CHROMIUM: PROJECT_CHROMIUM, common.REPO_DEPOT_TOOLS: PROJECT_CHROMIUM, common.REPO_PDFIUM: PROJECT_PDFIUM, common.REPO_SKIA: PROJECT_SKIA, common.REPO_SKIA_INFRA: PROJECT_SKIA, common.REPO_SKIA_INTERNAL: PROJECT_SKIA, common.REPO_SKIA_INTERNAL_TEST: PROJECT_SKIA, common.REPO_WEBRTC: PROJECT_WEBRTC, } )
Functions ¶
This section is empty.
Types ¶
type CommentRequest ¶
type CommentRequest struct {
Content string `json:"content"`
}
type IssueRequest ¶
type IssueRequest struct { Status string `json:"status"` Owner MonorailPerson `json:"owner"` CC []MonorailPerson `json:"cc"` Labels []string `json:"labels"` Summary string `json:"summary"` Description string `json:"description"` Components []string `json:"components,omitempty"` }
type IssueResponse ¶
type IssueResponse struct {
Items []Issue `json:"items"`
}
IssueResponse is used to decode JSON responses from the project hosting API.
type IssueTracker ¶
type IssueTracker interface { // FromQueury returns issue that match the given query string. FromQuery(q string) ([]Issue, error) // AddComment adds a comment to the issue with the given id AddComment(id string, comment CommentRequest) error // AddIssue creates an issue with the passed in params. AddIssue(issue IssueRequest) error }
IssueTracker is a genric interface to an issue tracker that allows us to connect issues with items (identified by an id).
func NewMonorailIssueTracker ¶
func NewMonorailIssueTracker(client *http.Client, project string) IssueTracker
type MonorailIssueTracker ¶
type MonorailIssueTracker struct {
// contains filtered or unexported fields
}
MonorailIssueTracker implements IssueTracker.
Note that, in order to use a MonorailIssueTracker from GCE, the client id of the project needs to be known to Monorail. Also note that the https://www.googleapis.com/auth/userinfo.email scope is needed.
func (*MonorailIssueTracker) AddComment ¶
func (m *MonorailIssueTracker) AddComment(id string, comment CommentRequest) error
AddComment adds a comment to the issue with the given id
func (*MonorailIssueTracker) AddIssue ¶
func (m *MonorailIssueTracker) AddIssue(issue IssueRequest) error
AddIssue creates an issue with the passed in params.
type MonorailPerson ¶
Directories ¶
Path | Synopsis |
---|---|
issues_helper is a simple command-line application for the monorail issue tracker.
|
issues_helper is a simple command-line application for the monorail issue tracker. |
Click to show internal directories.
Click to hide internal directories.