Given this history:
* 7450de7 (origin/master) Change 'README.md' file
|
| * dd8c39e (fork/candidate) Change 'golang.go' file
| |
| /
* 83f7e4d
|
* 7ccf9be
For a pull request to merge fork/candidate against origin/master, GetChanges rpc is returning golang.go and README.md.
I guess it's because DataService is fetching changes with kind of:
git diff 7450de7..dd8c39e
that returns all differences between 7450de7 and dd8c39e (what is wrong)
instead of doing:
git diff 7450de7...dd8c39e
that returns the differences between common ancestor (83f7e4d) and dd8c39e, representing the changes made by the branch being pullrequested.
Keeping this, forces the analyzer to avoid posting comments about files that were not modified in the PR being reviewed (ie. README.md), because otherwise GitHub API will return an unhandled Path is invalid error:
{
"message": "Unprocessable Entity",
"errors": []github.Error{}[
github.Error{
Resource:"Review",
Field:"",
Code:"custom",
Message:"Path is invalid"
}
],
}
(described by #487)
Given this history:
For a pull request to merge
fork/candidateagainstorigin/master,GetChangesrpc is returninggolang.goandREADME.md.I guess it's because
DataServiceis fetching changes with kind of:git diff 7450de7..dd8c39ethat returns all differences between
7450de7anddd8c39e(what is wrong)instead of doing:
git diff 7450de7...dd8c39ethat returns the differences between common ancestor (
83f7e4d) anddd8c39e, representing the changes made by the branch being pullrequested.Keeping this, forces the analyzer to avoid posting comments about files that were not modified in the PR being reviewed (ie.
README.md), because otherwise GitHub API will return an unhandledPath is invaliderror:(described by #487)