Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull request formatter: Find position in full diff and fix commit_id #91

Merged
merged 1 commit into from
Sep 20, 2015

Conversation

jhass
Copy link
Contributor

@jhass jhass commented Sep 6, 2015

https://developer.github.com/v3/pulls/comments/#create-a-comment
appears to be misleading or wrong, depending on how you interpret it.

commit_id is meant to reference the "state" of the PR when creating the
commit, that is it references the most recent commit of the PR, always.

position is meant to be the position in the full diff, not the position
in any single commit's diff.

With full diff the combined diff of all commits is meant, as you get for
example via /:owner/:repo/pull/:id.diff

https://developer.github.com/v3/pulls/comments/#create-a-comment
appears to be misleading or wrong, depending on how you interpret it.

commit_id is meant to reference the "state" of the PR when creating the
commit, that is it references the most recent commit of the PR, always.

position is meant to be the position in the full diff, not the position
in any single commit's diff.

With full diff the combined diff of all commits is meant, as you get for
example via /:owner/:repo/pull/:id.diff
@mmozuras
Copy link
Member

mmozuras commented Sep 7, 2015

@jhass thanks, I'll take more time with this PR as I want to test some scenarios myself 😄

mmozuras added a commit that referenced this pull request Sep 20, 2015
Pull request formatter: Find position in full diff and fix commit_id
@mmozuras mmozuras merged commit 0a21098 into prontolabs:master Sep 20, 2015
@mmozuras
Copy link
Member

@jhass thanks! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants