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

Invalid JSON file with multiline commit message #12

Closed
jslee02 opened this issue Mar 18, 2016 · 0 comments · Fixed by #13
Closed

Invalid JSON file with multiline commit message #12

jslee02 opened this issue Mar 18, 2016 · 0 comments · Fixed by #13

Comments

@jslee02
Copy link
Contributor

jslee02 commented Mar 18, 2016

When I try to upload JSON file generated by CoverallsGenerateGcov.cmake script, I get the following error:

{"message":"Couldn't find a repository matching this job.","error":true}

It seems this happens when the git commit message is multiline. Here is an example JSON file with multiline message:

  "git": {
    "head": {
      // ...
      "message": "Merge pull request #123 from some/project  

Pull request title with multiline comment"
    },
    "branch": "master",
    "remotes": []
  }

Since JSON doesn't allow real line break, this file is not valid one.

One possible solution I can come up with is replacing \n with \\n so that the message include \n instead of the real line breaks as:

  "git": {
    "head": {
      // ...
      "message": "Merge pull request #123 from some/project\n\nPull request title with multiline comment"
    },
    "branch": "master",
    "remotes": []
  }
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 a pull request may close this issue.

1 participant