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

commit_id is not part of the pull request #45

Closed
yshrsmz opened this issue May 18, 2016 · 4 comments
Closed

commit_id is not part of the pull request #45

yshrsmz opened this issue May 18, 2016 · 4 comments

Comments

@yshrsmz
Copy link

yshrsmz commented May 18, 2016

sorry to be late
after #44 , I got error below.

E, [2016-05-15T11:26:17.345644 #12599] ERROR -- Saddler: reporter
E, [2016-05-15T11:26:17.345693 #12599] ERROR -- Saddler: #<Saddler::Reporter::Github::PullRequestReviewComment:0x007ffc73b3ab88 @output=#<IO:<STDOUT>>>
/Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://api.github.com/repos/myuser/sampleapp/pulls/3537/comments: 422 - Validation Failed (Octokit::UnprocessableEntity)
Error summary:
  resource: PullRequestReviewComment
  code: custom
  field: commit_id
  message: commit_id is not part of the pull request // See: https://developer.github.com/v3/pulls/comments/#create-a-comment
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/response.rb:9:in `block in call'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/response.rb:8:in `call'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/sawyer-0.7.0/lib/sawyer/agent.rb:94:in `call'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/connection.rb:154:in `request'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/connection.rb:28:in `post'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/octokit-4.3.0/lib/octokit/client/pull_requests.rb:211:in `create_pull_request_comment'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/client.rb:80:in `create_pull_request_review_comment'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/pull_request_review_comment.rb:34:in `block in report'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/pull_request_review_comment.rb:33:in `each'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-reporter-github-1.0.0/lib/saddler/reporter/github/pull_request_review_comment.rb:33:in `report'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-1.0.0/lib/saddler/cli.rb:37:in `report'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/saddler-1.0.0/exe/saddler:5:in `<top (required)>'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/bin/saddler:23:in `load'
    from /Users/myuser/.rbenv/versions/2.0.0-p247/bin/saddler:23:in `<main>'

and environmental variables of Git Pull Request Builder plugin are below

$ghprbActualCommit: b237f0688c1bfa04555a76e61d693af5e072f40f  
$ghprbActualCommitAuthor: Yasuhiro Shimizu  
$ghprbActualCommitAuthorEmail: the.phantom.bane+github@gmail.com  
$ghprbPullDescription:  GitHub pull request '#3572' of commit b237f0688c1bfa04555a76e61d693af5e072f40f, no merge conflicts.  
$ghprbPullId: 3572  
$ghprbPullLink: https://github.com/myuser/sampleapp/pull/3572  
$ghprbPullTitle: Issue/3419 check wip  
$ghprbSourceBranch: issue/3419-check-wip  
$ghprbTargetBranch: master  
$sha1: origin/pr/3572/merge

result is the same if I send pr from forked repo, or original repo

@yshrsmz
Copy link
Author

yshrsmz commented May 18, 2016

and these are my jenkins & saddler scripts
https://gist.github.com/yshrsmz/4425c03326f7f7826ac87ee76bcecd55

@sanemat
Copy link
Member

sanemat commented May 19, 2016

Thank you for your reporting!
I'll investigate on this issue.

@gunyoki
Copy link

gunyoki commented Jun 5, 2016

I have the same issue.
To fix:
packsaddle/ruby-saddler-reporter-support-git#44

@yshrsmz
Copy link
Author

yshrsmz commented Jun 6, 2016

confirmed with ruby-saddler-reporter-support-git v2.0.1
and it's working!
thanks! @sanemat @gunyoki

@yshrsmz yshrsmz closed this as completed Jun 9, 2016
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

No branches or pull requests

3 participants