Skip to content

Commit 39f4768

Browse files
PLUGINAPI-79 Introduced new metric 'pull_request_fixed_issues'
1 parent db6dcd6 commit 39f4768

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 10.4
44

5+
* Add new metric `org.sonar.api.measures.CoreMetrics.PULL_REQUEST_FIXED_ISSUES` to represent issues that would be fixed by the pull request.
56
* Fixed misleading javadoc of `org.sonar.api.config.Configuration` to make it clear that at Compute Engine level project configuration is not provided.
67
* Deprecate `org.sonar.api.issue.DefaultTransitions.UNCOMFIRM`. There is no replacement as `org.sonar.api.issue.DefaultTransitions.CONFIRM` is subject to removal in the future.
78
* Deprecate `org.sonar.api.issue.DefaultTransitions.CONFIRM`. Use `org.sonar.api.issue.DefaultTransitions.ACCEPT` instead.

plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,21 @@ public final class CoreMetrics {
18271827
.setHidden(true)
18281828
.create();
18291829

1830+
/**
1831+
* @since 10.4
1832+
*
1833+
* This metric is only needed to present additional information for pull requests about number of issues that pull request might be
1834+
* fixing.
1835+
*/
1836+
public static final String PULL_REQUEST_FIXED_ISSUES_KEY = "pull_request_fixed_issues";
1837+
public static final Metric<Metric.Level> PULL_REQUEST_FIXED_ISSUES = new Metric.Builder(PULL_REQUEST_FIXED_ISSUES_KEY,
1838+
"Pull request fixed issues", Metric.ValueType.INT)
1839+
.setDescription("Count of issues that would be fixed by the pull request.")
1840+
.setDirection(Metric.DIRECTION_BETTER)
1841+
.setDomain(DOMAIN_ISSUES)
1842+
.setHidden(true)
1843+
.create();
1844+
18301845
private static final List<Metric> METRICS;
18311846

18321847
static {

0 commit comments

Comments
 (0)