Module Diff_parser

val parse_whole_file : Types.file_info list Angstrom.t

Parser of the diff file. The grammar is similar too

diff ::= ( head chunk* )*

See also file_head and a_chunk.

val parse_string : string -> (Types.file_info list, string) Stdlib.result

Main entry point. Uses parse_whole_file under the hood

val file_head : (string * string) option Angstrom.t

Parse header of the diff file

val a_chunk : Types.chunk Angstrom.t

Parses hunk for the file

val recover_lines : string -> (int * (int * int)) list
val lookup : Types.file_info list -> file:string -> line:int -> int option

The call lookup db ~file ~line searches in the list of file differences by a file name file and a file line line the corresponding line of in diff file (counting from the beginning of the information about file).

Github API requires this information to submit a review

val set_logging : bool -> unit

Enable or disable trace logging