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

GitHub API v3 breaking change #33

Open
LemonSpike opened this issue Mar 24, 2022 · 0 comments
Open

GitHub API v3 breaking change #33

LemonSpike opened this issue Mar 24, 2022 · 0 comments

Comments

@LemonSpike
Copy link

I've followed the getting started guide and have successfully integrated DangerSwiftCoverage on TeamCity CI:

Dangerfile.swift

import Danger
import DangerSwiftCoverage
import Foundation

print("Generating code coverage...")
Coverage.xcodeBuildCoverage(.xcresultBundle("Build/BenchSocialNetwork-DEV.xcresult"),
                            minimumCoverage: 50,
                            excludedTargets: ["BenchSocialNetworkTests.xctest", "BenchSocialNetworkUITests.xctest"])

Command: swift run danger-swift ci

Generating code coverage...
  xcrun xccov view --report --json Build/BenchSocialNetwork-DEV.xcresult > /var/folders/jd/pzvvs8196p5cj_0j56bscv280000gp/T/file

Failing the build, there is 1 fail.
  Request failed [422]: https://api.github.com/repos/<org>/<repo>/pulls/3/reviews
  Response: {
    "message": "Unprocessable Entity",
    "errors": [
      "Pull request review thread position is invalid and Pull request review thread diff hunk can't be blank"
    ],
    "documentation_url": "https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request
  }

I believe this is a breaking change with the way the plugin sends requests to GitHub, since the coverage generation gave an exit code of 0.

Hope you can advise / fix asap, 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

No branches or pull requests

1 participant