Pull Request comments made via API are not processed as markdown

peter.rebholz's Avatar

peter.rebholz

25 Feb, 2016 04:49 PM

I was playing around with having Jenkins approve/reject pull requests and I wanted to include a link to the build job that resulted in the status change. I tried using markdown but the raw message text is displayed. For example, if the following is submitted via the API (using rhodecode-api), it displays just as is shown below:

approved by Jenkins build [25](https://jenkins.example.com/job/test-pr-validate/25/)

The same text when pasted into the comments field gets render correctly. I also noticed that if I just included the URL without the markdown syntax it gets stripped out. I'm invoking the API using a shell script so maybe there is an escaping problem...

  1. Support Staff 1 Posted by Marcin Kuzminsk... on 25 Feb, 2016 05:06 PM

    Marcin Kuzminski's Avatar

    Hi Peter,

    We use it like that:

    rhodecode-api --instance-name=dev comment_pull_request '{"repoid":"pull-requests/default_reviewers", "pullrequestid":63, "message":"approved by Jenkins build [25](https://jenkins.example.com/job/test-pr-validate/25/)"}'
    

    It also takes raw JSON data so then all things get preserved. I tested it works for rst and markdown and renders based on rhodecode system renderer set in admin settings.

    Best,

  2. 2 Posted by peter.rebholz on 25 Feb, 2016 07:35 PM

    peter.rebholz's Avatar

    Marcin,

    That still isn't working for me. My guess is it's a version issue--I didn't see a release note, though. I have the latest tools installed (0.6.1) but RhodeCode is still 3.5.0. I'm hoping to test an upgrade soon so I can see if it works then.

  3. Support Staff 3 Posted by Marcin Kuzminsk... on 25 Feb, 2016 07:41 PM

    Marcin Kuzminski's Avatar

    Hi Peter,

    Yes i can confirm that api at 3.5.0 hadn't had renderer support.

    We're currently at 3.8.0, this version includes few nice improvements on pull requests.

    This version also includes removal of big close pr button, update pull request api.
    This version also no longer generates pull requests compare on landing page to prevent large compare loading initially.

    Best,

  4. Support Staff 4 Posted by Marcin Kuzminsk... on 13 Mar, 2017 04:50 PM

    Marcin Kuzminski's Avatar

    In order to keep our support system clean and improve our response time to the open tickets, I will now close this support ticket. Of course, if you still have questions regarding this issue you may reopen this ticket at your convenience.

  5. Marcin Kuzminski closed this discussion on 13 Mar, 2017 04:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

23 Nov, 2017 03:02 PM
21 Nov, 2017 06:38 PM
03 Oct, 2017 08:26 PM
03 Oct, 2017 05:48 PM
28 Sep, 2017 05:55 PM