Skip to content
Snippets Groups Projects

Double quotes break in commits JSON parsing #27

Merged Martin Lowe requested to merge github/fork/autumnfound/malowe/master/27 into master

Fixed issue with double quotes by adding anchor character of ~ in front of " in Git template string. Once fetched, a call is made to replace all quotes that don't have the anchor character with ", then replace the anchored quotes with " to produce valid JSON.

Signed-off-by: Martin Lowe martin.lowe@eclipse-foundation.org

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Review: Changes requested

    As discussed on Slack, I think we should consider another solution here instead of expecting git to return a proper JSON string.

    I would like to propose that we try to store Ruby objects in processed_git_data instead of JSON strings in order. I am hoping that MultiJson will do a better job at encoding the JSON than we can do with git show.

    Example: author = { :name => git show -s --format=%an }

    We would then need to use MultiJson.dump() before calling our API.

Please register or sign in to reply
Loading