diff options
Diffstat (limited to 'third_party/go/git-appraise/schema')
-rw-r--r-- | third_party/go/git-appraise/schema/analysis.json | 61 | ||||
-rw-r--r-- | third_party/go/git-appraise/schema/ci.json | 42 | ||||
-rw-r--r-- | third_party/go/git-appraise/schema/comment.json | 75 | ||||
-rw-r--r-- | third_party/go/git-appraise/schema/request.json | 58 |
4 files changed, 236 insertions, 0 deletions
diff --git a/third_party/go/git-appraise/schema/analysis.json b/third_party/go/git-appraise/schema/analysis.json new file mode 100644 index 000000000000..cbecb5416bc9 --- /dev/null +++ b/third_party/go/git-appraise/schema/analysis.json @@ -0,0 +1,61 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + + "properties": { + "timestamp": { + "description": "the number of seconds since the Unix epoch", + "type": "string", + "minLength": 10, + "maxLength": 10, + "pattern": "[0-9]{10,10}" + }, + + "status": { + "description": "represents the overall status of all messages from the analysis results", + "oneOf": [{ + "$ref": "#/definitions/lgtm" + }, { + "$ref": "#/definitions/fyi" + }, { + "$ref": "#/definitions/nmw" + }] + }, + + "url": { + "description": "a publicly readable file, which contains JSON formatted analysis results. Those results should conform to the JSON format of the ShipshapeResponse protocol buffer message defined https://github.com/google/shipshape/blob/master/shipshape/proto/shipshape_rpc.proto", + "type": "string" + }, + + "v": { + "type": "integer", + "enum": [0] + } + }, + + "required": [ + "timestamp", + "url" + ], + + "definitions": { + "lgtm": { + "title": "Looks Good To Me", + "description": "indicates the analysis produced no messages", + "type": "string", + "enum": ["lgtm"] + }, + "fyi": { + "title": "For your information", + "description": "indicates the analysis produced some messages, but none of them indicate errors", + "type": "string", + "enum": ["fyi"] + }, + "nmw": { + "title": "Needs more work", + "description": "indicates the analysis produced at least one message indicating an error", + "type": "string", + "enum": ["nmw"] + } + } +} diff --git a/third_party/go/git-appraise/schema/ci.json b/third_party/go/git-appraise/schema/ci.json new file mode 100644 index 000000000000..7436408290ce --- /dev/null +++ b/third_party/go/git-appraise/schema/ci.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + + "properties": { + "timestamp": { + "description": "the number of seconds since the Unix epoch", + "type": "string", + "minLength": 10, + "maxLength": 10, + "pattern": "[0-9]{10,10}" + }, + + "agent": { + "description": "a free-form string that identifies the build and test runner", + "type": "string" + }, + + "status": { + "description": "the final status of a build or test", + "type": "string", + "enum": [ + "success", + "failure" + ] + }, + + "url": { + "type": "string" + }, + + "v": { + "type": "integer", + "enum": [0] + } + }, + + "required": [ + "timestamp", + "agent" + ] +} diff --git a/third_party/go/git-appraise/schema/comment.json b/third_party/go/git-appraise/schema/comment.json new file mode 100644 index 000000000000..a39b1a2e670b --- /dev/null +++ b/third_party/go/git-appraise/schema/comment.json @@ -0,0 +1,75 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + + "properties": { + "timestamp": { + "description": "the number of seconds since the Unix epoch", + "type": "string", + "minLength": 10, + "maxLength": 10, + "pattern": "[0-9]{10,10}" + }, + + "author": { + "type": "string" + }, + + "original": { + "description": "the SHA1 hash of another comment on the same revision, and it means this comment is an updated version of that comment", + "type": "string" + }, + + "parent": { + "description": "the SHA1 hash of another comment on the same revision, and it means this comment is a reply to that comment", + "type": "string" + }, + + "location": { + "type": "object", + "properties": { + "commit": { + "type": "string" + }, + "path": { + "type": "string" + }, + "range": { + "type": "object", + "properties": { + "startLine": { + "type": "integer" + }, + "startColumn": { + "type": "integer" + }, + "endLine": { + "type": "integer" + }, + "endColumn": { + "type": "integer" + } + } + } + } + }, + + "description": { + "type": "string" + }, + + "resolved": { + "type": "boolean" + }, + + "v": { + "type": "integer", + "enum": [0] + } + }, + + "required": [ + "timestamp", + "author" + ] +} diff --git a/third_party/go/git-appraise/schema/request.json b/third_party/go/git-appraise/schema/request.json new file mode 100644 index 000000000000..9ec022a16e9e --- /dev/null +++ b/third_party/go/git-appraise/schema/request.json @@ -0,0 +1,58 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + + "properties": { + "timestamp": { + "description": "the number of seconds since the Unix epoch", + "type": "string", + "minLength": 10, + "maxLength": 10, + "pattern": "[0-9]{10,10}" + }, + + "requester": { + "type": "string" + }, + + "baseCommit": { + "type": "string" + }, + + "reviewRef": { + "description": "used to specify a git ref that tracks the current revision under review", + "type": "string" + }, + + "targetRef": { + "description": "used to specify the git ref that should be updated once the review is approved", + "type": "string" + }, + + "reviewers": { + "type": "array", + "items": { + "type": "string" + } + }, + + "description": { + "type": "string" + }, + + "v": { + "type": "integer", + "enum": [0] + }, + + "alias": { + "description": "used to specify a post-rebase commit hash for the review", + "type": "string" + } + }, + + "required": [ + "timestamp", + "requester" + ] +} |