{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/28877573","id":28877573,"diff_hunk":"@@ -0,0 +1,693 @@\n+// Copyright 2015 The Prometheus Authors\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+// http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+package promql\n+\n+import (\n+\t\"fmt\"\n+\t\"reflect\"\n+\t\"strings\"\n+\t\"unicode\"\n+\t\"unicode/utf8\"\n+)\n+\n+// item represents a token or text string returned from the scanner.\n+type item struct {\n+\ttyp itemType // The type of this item.\n+\tpos Pos      // The starting position, in bytes, of this item in the input string.\n+\tval string   // The value of this item.\n+}\n+\n+// String returns a descriptive string for the item.\n+func (i item) String() string {\n+\tswitch {\n+\tcase i.typ == itemEOF:\n+\t\treturn \"EOF\"\n+\tcase i.typ == itemError:\n+\t\treturn i.val\n+\tcase i.typ.isKeyword():\n+\t\treturn fmt.Sprintf(\"<%s>\", i.val)\n+\tcase i.typ.isOperator():\n+\t\treturn fmt.Sprintf(\"<op:%s>\", i.val)\n+\tcase i.typ.isAggregator():\n+\t\treturn fmt.Sprintf(\"<aggr:%s>\", i.val)\n+\tcase len(i.val) > 10:\n+\t\treturn fmt.Sprintf(\"%.10q...\", i.val)\n+\t}\n+\treturn fmt.Sprintf(\"%q\", i.val)\n+}\n+\n+// isOperator returns true if the item corresponds to a logical or arithmetic operator.\n+// Returns false otherwise.\n+func (i itemType) isOperator() bool { return i > operators_start && i < operators_end }\n+\n+// isAggregator returns true if the item belongs to the aggregator functions.\n+// Returns false otherwise\n+func (i itemType) isAggregator() bool { return i > aggregators_start && i < aggregators_end }\n+\n+// isKeyword returns true if the item corresponds to a keyword.\n+// Returns false otherwise.\n+func (i itemType) isKeyword() bool { return i > keywords_start && i < keywords_end }\n+\n+// Constants for operator precedence in expressions.\n+const (\n+\tLowestPrec  = 0 // non-operators\n+\tHighestPrec = 7\n+)\n+\n+// Precedence returns the operator precedence of the binary\n+// operator op. If op is not a binary operator, the result\n+// is LowestPrec.\n+func (i itemType) precedence() int {\n+\tswitch i {\n+\tcase itemLOR:\n+\t\treturn 1\n+\tcase itemLAND:\n+\t\treturn 2\n+\tcase itemEQL, itemNEQ, itemLTE, itemLSS, itemGTE, itemGTR:\n+\t\treturn 3\n+\tcase itemADD, itemSUB:\n+\t\treturn 4\n+\tcase itemMUL, itemQUO, itemREM:\n+\t\treturn 5\n+\t}\n+\treturn LowestPrec\n+}\n+\n+type itemType int\n+\n+const (\n+\titemError itemType = iota // Error occurred, value is error message\n+\titemEOF\n+\titemComment\n+\titemIdentifier\n+\titemMetricIdentifier\n+\titemLeftParen\n+\titemRightParen\n+\titemLeftBrace\n+\titemRightBrace\n+\titemLeftBracket\n+\titemRightBracket\n+\titemComma\n+\titemAssign\n+\titemSemicolon\n+\titemString\n+\titemNumber\n+\titemDuration\n+\n+\toperators_start\n+\t// operators\n+\titemSUB\n+\titemADD\n+\titemMUL\n+\titemREM\n+\titemQUO\n+\titemLAND\n+\titemLOR\n+\titemEQL\n+\titemNEQ\n+\titemLTE\n+\titemLSS\n+\titemGTE\n+\titemGTR\n+\titemEQLRegex\n+\titemNEQRegex\n+\toperators_end\n+\n+\taggregators_start\n+\t// aggregators\n+\titemAvg\n+\titemCount\n+\titemSum\n+\titemMin\n+\titemMax\n+\titemStddev\n+\titemStdvar\n+\taggregators_end\n+\n+\tkeywords_start\n+\t// keywords\n+\titemAlert\n+\titemIf\n+\titemFor\n+\titemWith\n+\titemSummary\n+\titemDescription\n+\titemKeepingExtra\n+\titemOffset\n+\titemBy\n+\titemOn\n+\titemGroupLeft\n+\titemGroupRight\n+\tkeywords_end\n+)\n+\n+var key = map[string]itemType{\n+\t// operators\n+\t\"AND\": itemLAND,\n+\t\"OR\":  itemLOR,\n+\n+\t// aggregators\n+\t\"SUM\":    itemSum,\n+\t\"AVG\":    itemAvg,\n+\t\"COUNT\":  itemCount,\n+\t\"MIN\":    itemMin,\n+\t\"MAX\":    itemMax,\n+\t\"STDDEV\": itemStddev,\n+\t\"STDVAR\": itemStdvar,\n+\n+\t// keywords\n+\t\"ALERT\":         itemAlert,\n+\t\"IF\":            itemIf,\n+\t\"FOR\":           itemFor,\n+\t\"WITH\":          itemWith,\n+\t\"SUMMARY\":       itemSummary,\n+\t\"DESCRIPTION\":   itemDescription,\n+\t\"OFFSET\":        itemOffset,\n+\t\"BY\":            itemBy,\n+\t\"KEEPING_EXTRA\": itemKeepingExtra,\n+\t\"ON\":            itemOn,\n+\t\"GROUP_LEFT\":    itemGroupLeft,\n+\t\"GROUP_RIGHT\":   itemGroupRight,\n+}\n+\n+// These are the default string representation for common items. It does not\n+// imply that those are the only character sequences that can be lexed to such an item.\n+var itemTypeStr = map[itemType]string{\n+\titemSUB:      \"-\",\n+\titemADD:      \"+\",\n+\titemMUL:      \"*\",\n+\titemREM:      \"%\",\n+\titemQUO:      \"/\",\n+\titemEQL:      \"==\",\n+\titemNEQ:      \"!=\",\n+\titemLTE:      \"<-\",\n+\titemLSS:      \"<\",\n+\titemGTE:      \">=\",\n+\titemGTR:      \">\",\n+\titemEQLRegex: \"=~\",\n+\titemNEQRegex: \"!~\",\n+}\n+\n+func init() {\n+\t// Add keywords to item type strings.\n+\tfor s, ty := range key {\n+\t\titemTypeStr[ty] = s\n+\t}\n+}\n+\n+func (t itemType) String() string {\n+\tif s, ok := itemTypeStr[t]; ok {\n+\t\treturn s\n+\t}\n+\treturn reflect.TypeOf(t).Name()\n+}\n+\n+const eof = -1\n+\n+// stateFn represents the state of the scanner as a function that returns the next state.\n+type stateFn func(*lexer) stateFn\n+\n+type Pos int\n+\n+// lexer holds the state of the scanner.\n+type lexer struct {\n+\tname    string    // The name of the input; used only for error reports\n+\tinput   string    // The string being scanned\n+\tstate   stateFn   // The next lexing function to enter\n+\tpos     Pos       // Current position in the input\n+\tstart   Pos       // Start position of this item\n+\twidth   Pos       // Width of last rune read from input\n+\tlastPos Pos       // Position of most recent item returned by nextItem\n+\titems   chan item // Channel of scanned items\n+\n+\tparenDepth  int  // Nesting depth of ( ) exprs\n+\tbraceOpen   bool // Whether a { is opened\n+\tbracketOpen bool // Whether a [ is opened\n+\tstringOpen  rune // Quote rune of the string currently being read\n+}\n+\n+// next returns the next rune in the input.\n+func (l *lexer) next() rune {\n+\tif int(l.pos) >= len(l.input) {\n+\t\tl.width = 0\n+\t\treturn eof\n+\t}\n+\tr, w := utf8.DecodeRuneInString(l.input[l.pos:])\n+\tl.width = Pos(w)\n+\tl.pos += l.width\n+\treturn r\n+}\n+\n+// peek returns but does not consume the next rune in the input.\n+func (l *lexer) peek() rune {\n+\tr := l.next()\n+\tl.backup()\n+\treturn r\n+}\n+\n+// backup steps back one rune. Can only be called once per call of next.\n+func (l *lexer) backup() {\n+\tl.pos -= l.width\n+}\n+\n+// emit passes an item back to the client.\n+func (l *lexer) emit(t itemType) {\n+\tl.items <- item{t, l.start, l.input[l.start:l.pos]}\n+\tl.start = l.pos\n+}\n+\n+// ignore skips over the pending input before this point.\n+func (l *lexer) ignore() {\n+\tl.start = l.pos\n+}\n+\n+// accept consumes the next rune if it's from the valid set.\n+func (l *lexer) accept(valid string) bool {\n+\tif strings.IndexRune(valid, l.next()) >= 0 {\n+\t\treturn true\n+\t}\n+\tl.backup()\n+\treturn false\n+}\n+\n+// acceptRun consumes a run of runes from the valid set.\n+func (l *lexer) acceptRun(valid string) {\n+\tfor strings.IndexRune(valid, l.next()) >= 0 {\n+\t\t// consume\n+\t}\n+\tl.backup()\n+}\n+\n+// lineNumber reports which line we're on, based on the position of\n+// the previous item returned by nextItem. Doing it this way\n+// means we don't have to worry about peek double counting.\n+func (l *lexer) lineNumber() int {\n+\treturn 1 + strings.Count(l.input[:l.lastPos], \"\\n\")\n+}\n+\n+// linePosition reports at which character in the current line\n+// we are on.\n+func (l *lexer) linePosition() Pos {\n+\tlb := Pos(strings.LastIndex(l.input[:l.lastPos], \"\\n\"))\n+\tif lb == -1 {\n+\t\treturn 1 + l.lastPos\n+\t}\n+\treturn 1 + l.lastPos - lb\n+}\n+\n+// errorf returns an error token and terminates the scan by passing\n+// back a nil pointer that will be the next state, terminating l.nextItem.\n+func (l *lexer) errorf(format string, args ...interface{}) stateFn {\n+\tl.items <- item{itemError, l.start, fmt.Sprintf(format, args...)}\n+\treturn nil\n+}\n+\n+// nextItem returns the next item from the input.\n+func (l *lexer) nextItem() item {\n+\titem := <-l.items\n+\tl.lastPos = item.pos\n+\treturn item\n+}\n+\n+// lex creates a new scanner for the input string.\n+func lex(name, input string) *lexer {\n+\tl := &lexer{\n+\t\tname:  name,\n+\t\tinput: input,\n+\t\titems: make(chan item),\n+\t}\n+\tgo l.run()\n+\treturn l\n+}\n+\n+// run runs the state machine for the lexer.\n+func (l *lexer) run() {\n+\tfor l.state = lexStatements; l.state != nil; {\n+\t\tl.state = l.state(l)\n+\t}\n+\tclose(l.items)\n+}\n+\n+const (\n+\tlineComment  = \"//\"","path":"promql/lex.go","position":343,"original_position":343,"commit_id":"cc77c205f9391203885acfeac784c06eec80987c","original_commit_id":"cc77c205f9391203885acfeac784c06eec80987c","user":{"login":"juliusv","id":538008,"avatar_url":"https://avatars.githubusercontent.com/u/538008?v=3","gravatar_id":"","url":"https://api.github.com/users/juliusv","html_url":"https://github.com/juliusv","followers_url":"https://api.github.com/users/juliusv/followers","following_url":"https://api.github.com/users/juliusv/following{/other_user}","gists_url":"https://api.github.com/users/juliusv/gists{/gist_id}","starred_url":"https://api.github.com/users/juliusv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliusv/subscriptions","organizations_url":"https://api.github.com/users/juliusv/orgs","repos_url":"https://api.github.com/users/juliusv/repos","events_url":"https://api.github.com/users/juliusv/events{/privacy}","received_events_url":"https://api.github.com/users/juliusv/received_events","type":"User","site_admin":false},"body":"Let's do only `#`-style comments instead of C/C++ style ones in the new language. We had a discussion on this a few weeks ago on IRC, and everyone agreed (and we never mentioned the old comments in docs yet, so it should not be a \"breaking\" change, actually).","created_at":"2015-04-22T14:32:50Z","updated_at":"2015-04-22T14:32:50Z","html_url":"https://github.com/prometheus/prometheus/pull/639#discussion_r28877573","pull_request_url":"https://api.github.com/repos/prometheus/prometheus/pulls/639","_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/28877573"},"html":{"href":"https://github.com/prometheus/prometheus/pull/639#discussion_r28877573"},"pull_request":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/639"}}},"pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/639","id":33430243,"html_url":"https://github.com/prometheus/prometheus/pull/639","diff_url":"https://github.com/prometheus/prometheus/pull/639.diff","patch_url":"https://github.com/prometheus/prometheus/pull/639.patch","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/639","number":639,"state":"open","locked":false,"title":"Create promql package with lexer/parser.","user":{"login":"fabxc","id":4948210,"avatar_url":"https://avatars.githubusercontent.com/u/4948210?v=3","gravatar_id":"","url":"https://api.github.com/users/fabxc","html_url":"https://github.com/fabxc","followers_url":"https://api.github.com/users/fabxc/followers","following_url":"https://api.github.com/users/fabxc/following{/other_user}","gists_url":"https://api.github.com/users/fabxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fabxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabxc/subscriptions","organizations_url":"https://api.github.com/users/fabxc/orgs","repos_url":"https://api.github.com/users/fabxc/repos","events_url":"https://api.github.com/users/fabxc/events{/privacy}","received_events_url":"https://api.github.com/users/fabxc/received_events","type":"User","site_admin":false},"body":"This commit creates a (so far unused) package. It contains the a custom\r\nlexer/parser for the query language.\r\n\r\n`ast.go`: New AST that interacts well with the parser.\r\n`lex.go`: Custom lexer (new).\r\n`lex_test.go`: Lexer tests (new).\r\n`parse.go`: Custom parser (new).\r\n`parse_test.go`: Parser tests (new).\r\n`functions.go`: Changed function type, dummies for parser testing (barely changed/dummies).\r\n`printer.go`: Adapted from rules/ and adjusted to new AST (mostly unchanged, few additions).\r\n\r\nThis is the first of 3 PRs to create a custom/parser lexer and refactor querying into its\r\nown `promql` package.","created_at":"2015-04-16T08:53:29Z","updated_at":"2015-04-22T14:32:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2e0d19b3a9ec367065218a960c4cd0cb4728f9b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/prometheus/pulls/639/commits","review_comments_url":"https://api.github.com/repos/prometheus/prometheus/pulls/639/comments","review_comment_url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/639/comments","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/cc77c205f9391203885acfeac784c06eec80987c","head":{"label":"fabxc:fabxc/promql_1","ref":"fabxc/promql_1","sha":"cc77c205f9391203885acfeac784c06eec80987c","user":{"login":"fabxc","id":4948210,"avatar_url":"https://avatars.githubusercontent.com/u/4948210?v=3","gravatar_id":"","url":"https://api.github.com/users/fabxc","html_url":"https://github.com/fabxc","followers_url":"https://api.github.com/users/fabxc/followers","following_url":"https://api.github.com/users/fabxc/following{/other_user}","gists_url":"https://api.github.com/users/fabxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fabxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabxc/subscriptions","organizations_url":"https://api.github.com/users/fabxc/orgs","repos_url":"https://api.github.com/users/fabxc/repos","events_url":"https://api.github.com/users/fabxc/events{/privacy}","received_events_url":"https://api.github.com/users/fabxc/received_events","type":"User","site_admin":false},"repo":{"id":30128367,"name":"prometheus","full_name":"fabxc/prometheus","owner":{"login":"fabxc","id":4948210,"avatar_url":"https://avatars.githubusercontent.com/u/4948210?v=3","gravatar_id":"","url":"https://api.github.com/users/fabxc","html_url":"https://github.com/fabxc","followers_url":"https://api.github.com/users/fabxc/followers","following_url":"https://api.github.com/users/fabxc/following{/other_user}","gists_url":"https://api.github.com/users/fabxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fabxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabxc/subscriptions","organizations_url":"https://api.github.com/users/fabxc/orgs","repos_url":"https://api.github.com/users/fabxc/repos","events_url":"https://api.github.com/users/fabxc/events{/privacy}","received_events_url":"https://api.github.com/users/fabxc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabxc/prometheus","description":"The Prometheus monitoring system and time series database.","fork":true,"url":"https://api.github.com/repos/fabxc/prometheus","forks_url":"https://api.github.com/repos/fabxc/prometheus/forks","keys_url":"https://api.github.com/repos/fabxc/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabxc/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabxc/prometheus/teams","hooks_url":"https://api.github.com/repos/fabxc/prometheus/hooks","issue_events_url":"https://api.github.com/repos/fabxc/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/fabxc/prometheus/events","assignees_url":"https://api.github.com/repos/fabxc/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/fabxc/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/fabxc/prometheus/tags","blobs_url":"https://api.github.com/repos/fabxc/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabxc/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabxc/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabxc/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabxc/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/fabxc/prometheus/languages","stargazers_url":"https://api.github.com/repos/fabxc/prometheus/stargazers","contributors_url":"https://api.github.com/repos/fabxc/prometheus/contributors","subscribers_url":"https://api.github.com/repos/fabxc/prometheus/subscribers","subscription_url":"https://api.github.com/repos/fabxc/prometheus/subscription","commits_url":"https://api.github.com/repos/fabxc/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabxc/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabxc/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabxc/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabxc/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/fabxc/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabxc/prometheus/merges","archive_url":"https://api.github.com/repos/fabxc/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabxc/prometheus/downloads","issues_url":"https://api.github.com/repos/fabxc/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/fabxc/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/fabxc/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/fabxc/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabxc/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/fabxc/prometheus/releases{/id}","created_at":"2015-01-31T22:16:31Z","updated_at":"2015-04-20T07:46:36Z","pushed_at":"2015-04-22T09:11:45Z","git_url":"git://github.com/fabxc/prometheus.git","ssh_url":"git@github.com:fabxc/prometheus.git","clone_url":"https://github.com/fabxc/prometheus.git","svn_url":"https://github.com/fabxc/prometheus","homepage":"http://prometheus.io/","size":7323,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prometheus:fabxc/promql","ref":"fabxc/promql","sha":"54f5c524e511d96770f8b0f2353c11bc6401f3ee","user":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":6838921,"name":"prometheus","full_name":"prometheus/prometheus","owner":{"login":"prometheus","id":3380462,"avatar_url":"https://avatars.githubusercontent.com/u/3380462?v=3","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/prometheus","description":"The Prometheus monitoring system and time series database.","fork":false,"url":"https://api.github.com/repos/prometheus/prometheus","forks_url":"https://api.github.com/repos/prometheus/prometheus/forks","keys_url":"https://api.github.com/repos/prometheus/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/prometheus/teams","hooks_url":"https://api.github.com/repos/prometheus/prometheus/hooks","issue_events_url":"https://api.github.com/repos/prometheus/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/prometheus/events","assignees_url":"https://api.github.com/repos/prometheus/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/prometheus/tags","blobs_url":"https://api.github.com/repos/prometheus/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/prometheus/languages","stargazers_url":"https://api.github.com/repos/prometheus/prometheus/stargazers","contributors_url":"https://api.github.com/repos/prometheus/prometheus/contributors","subscribers_url":"https://api.github.com/repos/prometheus/prometheus/subscribers","subscription_url":"https://api.github.com/repos/prometheus/prometheus/subscription","commits_url":"https://api.github.com/repos/prometheus/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/prometheus/merges","archive_url":"https://api.github.com/repos/prometheus/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/prometheus/downloads","issues_url":"https://api.github.com/repos/prometheus/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/prometheus/releases{/id}","created_at":"2012-11-24T11:14:12Z","updated_at":"2015-04-22T13:35:38Z","pushed_at":"2015-04-22T09:11:46Z","git_url":"git://github.com/prometheus/prometheus.git","ssh_url":"git@github.com:prometheus/prometheus.git","clone_url":"https://github.com/prometheus/prometheus.git","svn_url":"https://github.com/prometheus/prometheus","homepage":"http://prometheus.io/","size":16206,"stargazers_count":1998,"watchers_count":1998,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":82,"forks":104,"open_issues":82,"watchers":1998,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/639"},"html":{"href":"https://github.com/prometheus/prometheus/pull/639"},"issue":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/639"},"comments":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/639/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/639/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/639/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/prometheus/statuses/cc77c205f9391203885acfeac784c06eec80987c"}}}}