SonarQube icon

SonarQube

Consume SonarQube and SonarCloud Web API

Actions8

Measure → Get Component

AI-generated

Overview

This node interacts with the SonarQube API to retrieve measures for a specified component within a project. It is useful for obtaining specific metric data about a project component, such as code quality metrics, technical debt, or other analysis results tracked by SonarQube. For example, a user can fetch metrics like code coverage or complexity for a given project key to monitor software quality.

Use Case Examples

  1. Fetch code coverage and complexity metrics for a project component identified by its key.
  2. Retrieve specific SonarQube metrics for a component to integrate quality data into a CI/CD pipeline.

Properties

Name Meaning
Component Key The unique key identifying the project component for which measures are to be retrieved.
Metric Key Names or IDs A list of metric keys or IDs specifying which metrics to retrieve for the component.
Additional Fields Optional fields to specify branch name or pull request ID to filter the measures.

Output

JSON

  • component - The component (project) key for which measures were retrieved.
  • measures - The list of measures (metrics) retrieved for the component, including their values and details.

Dependencies

  • Requires an API key credential for SonarQube API authentication.

Troubleshooting

  • Ensure the component key is correct and exists in the SonarQube instance to avoid 'component not found' errors.
  • Verify that the metric keys specified are valid and available in the SonarQube metrics list to prevent empty or error responses.
  • Check network connectivity and API credentials if authentication or connection errors occur.

Links

Discussion