简体   繁体   中英

How to select javascript issues and their comments?

I am using the SonarQube 6.4 API in order to search for issues. I do have two questions regarding it:

  1. Can I filter on issues related to a language?

I tried http://localhost:9000/api/issues/search?vulnerabilities=BLOCKER&language=JAVASCRIPT and I've got results for other languages in the json too.

  1. If a tester adds a comment for a specific issue, can I have it in the json results? If so, how?

在此输入图像描述

  1. According to the docs for the issue search web service , here are the parameters you need to make your query work right:
    • types=VUNLERABILITY
    • severities=BLOCKER
    • languages=js

To be fair, it doesn't explicitly say that 'js' is the language key for JavaScript, but it does show it in the example. The easiest way to know what the key is for a language is do to a search for its issues via the interface and then look at the resulting URL

  1. To add comments to the response, you'll also need
    • additionalFields=comments

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM