GrepResponse
The answer to a content search: the matching lines at one commit, each with the lines around it.
Shape
matchesarray of GrepMatchMatching lines, grouped by file in path order and by line within a file.
- The GrepMatch schema
- afterarray of stringThe lines just after the match, in file order.
- beforearray of stringThe lines just before the match, in file order.
- lineinteger0–∞The line number of the match, counting from 1.
- pathstringThe file the match is in, relative to the repository root.
- textstringThe matching line. A very long line is shortened and ends with
….
- shaCommitHash (string)The commit that was searched. Repeating the search at this commit returns the same lines.
- truncatedbooleanThe search stopped before it finished — it reached its match limit, its size limit or its time limit. More matches may exist; narrow the search with a path or a more specific pattern to see them.
Example
Synthesized example{
"matches": [
{
"after": [],
"before": [],
"line": 81,
"path": "path-033f",
"text": "text-45ec"
},
{
"after": [],
"before": [],
"line": 60,
"path": "path-f41e",
"text": "text-69d8"
}
],
"sha": "47318e8a461ef0615f92215996a36f3d90c5bc4b",
"truncated": false
}
Graph
Used inside
No schema contains this one.
Contains
Used by
Sent by 0 operations
No operation takes it as a request body.
Returned by 1 operation