Age | Commit message (Collapse) | Author |
|
Will test patching a file using the generated suggestion patch.
|
|
Testing out 'unidiff' to build the patch. Trying to see if it will
adjust the line numbers automatically when the patch is modified.
Doesn't look like it. Seems like it has a nice interface, though.
Still having trouble applying the patch due to complaints of patch
format errors.
|
|
Update the regex matcher to allow both LF line endings and CRLF.
|
|
Describe the source of the test data.
|
|
Still working on it, but have an initial draft working. There's no file
name in the diff hunk, so I'm assuming I'm going to have to add one
later.
Build a patch from the diff hunk and suggestion comment.
1. Remove `-` lines
2. Change `+` lines to ` `
3. Change last line to `-`
4. Append suggestion to the diff with a `+` prefix
|
|
Split the `Suggestion` struct into a new `Client` struct for the GitHub
request, and `Suggestion` for the required response data.
|
|
Add a `Suggestion` struct to represent a GitHub PR suggestion comment.
Use the 'github-rs' library to fetch a given comment from the site by
its ID.
Converted the 'github-rs' error into a string because its
`github_rs::client::Error` type is private, so I can't define an error
variant source with that type.
|
|
Initialised with:
$ cargo init --bin
|