@Singleton public class

PullRequestInsightResource

extends AbstractInsightResource
java.lang.Object
   ↳ com.atlassian.bitbucket.rest.RestResource
     ↳ com.atlassian.bitbucket.internal.codeinsights.rest.AbstractInsightResource
       ↳ com.atlassian.bitbucket.internal.codeinsights.rest.PullRequestInsightResource

Summary

[Expand]
Inherited Constants
From class com.atlassian.bitbucket.internal.codeinsights.rest.AbstractInsightResource
[Expand]
Inherited Fields
From class com.atlassian.bitbucket.rest.RestResource
Public Constructors
PullRequestInsightResource(I18nService i18nService, InsightAnnotationService insightAnnotationService, InsightReportService insightReportService)
Public Methods
Response getAnnotations(PullRequest pullRequest, List<String> keys, List<String> externalIds, List<String> paths, List<AnnotationSeverity> severities, List<AnnotationType> type, AnnotationLocation annotationLocation, String projectKey, String repoSlug, long pullRequestId)
Get all annotations associated with the latest commit of the given pull request's source branch, filtered by any query parameters given.
Response getReport(PullRequest pullRequest, String key, String projectKey, String repoSlug, long pullRequestId)
Get the report with the given key at the latest commit on the source branch of the given pull request.
Response getReportAnnotations(PullRequest pullRequest, String key, List<String> externalIds, List<String> paths, List<AnnotationSeverity> severities, List<AnnotationType> types, String projectKey, String repoSlug, long pullRequestId)
Get annotations for the given report at latest commit of the source branch of the given pull request, filtered by any query parameters given.
Response getReports(PullRequest pullRequest, PageRequest pageRequest, String projectKey, String repoSlug, long pullRequestId)
Get all reports at the latest commit of the given pull request's source branch.
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.internal.codeinsights.rest.AbstractInsightResource
From class com.atlassian.bitbucket.rest.RestResource
From class java.lang.Object

Public Constructors

public PullRequestInsightResource (I18nService i18nService, InsightAnnotationService insightAnnotationService, InsightReportService insightReportService)

Public Methods

public Response getAnnotations (PullRequest pullRequest, List<String> keys, List<String> externalIds, List<String> paths, List<AnnotationSeverity> severities, List<AnnotationType> type, AnnotationLocation annotationLocation, String projectKey, String repoSlug, long pullRequestId)

Get all annotations associated with the latest commit of the given pull request's source branch, filtered by any query parameters given.

Parameters
keys Return only annotations that belong to one of the provided report keys. Can be specified more than once to filter by more than one report
externalIds Return only annotations that have one of the provided external IDs. Can be specified more than once to filter by more than one external ID
paths Return only annotations that appear on one of the provided paths. Can be specified more than once to filter by more than one path
severities Return only annotations that have one of the given severities. Can be specified more than once to filter by more than one severity. Valid severities are LOW, MEDIUM and HIGH
type Return only annotations that have one of the given types. Can be specified more than once to filter by multiple types. Valid types are BUG, CODE_SMELL, and VULNERABILITY
projectKey The project key
repoSlug The repository slug
pullRequestId The pull request ID

public Response getReport (PullRequest pullRequest, String key, String projectKey, String repoSlug, long pullRequestId)

Get the report with the given key at the latest commit on the source branch of the given pull request.

Parameters
key The key of the report to retrieve
projectKey The project key
repoSlug The repository slug
pullRequestId The pull request ID

public Response getReportAnnotations (PullRequest pullRequest, String key, List<String> externalIds, List<String> paths, List<AnnotationSeverity> severities, List<AnnotationType> types, String projectKey, String repoSlug, long pullRequestId)

Get annotations for the given report at latest commit of the source branch of the given pull request, filtered by any query parameters given.

Parameters
key The key of the report to which the annotations belong
externalIds Return only annotations that have one of the provided external IDs. Can be specified more than once to filter by more than one external ID
paths Return only annotations that appear on one of the provided paths. Can be specified more than once to filter by more than one path
severities Return only annotations that have one of the given severities. Can be specified more than once to filter by more than one severity. Valid severities are LOW, MEDIUM and HIGH
types Return only annotations that have one of the given types. Can be specified more than once to filter by multiple types. Valid types are BUG, CODE_SMELL, and VULNERABILITY
projectKey The project key
repoSlug The repository slug
pullRequestId The pull request ID

public Response getReports (PullRequest pullRequest, PageRequest pageRequest, String projectKey, String repoSlug, long pullRequestId)

Get all reports at the latest commit of the given pull request's source branch.

Parameters
projectKey The project key
repoSlug The repository slug
pullRequestId The pull request ID