Skip to content

/AWS1/CL_GUR=>LISTCODEREVIEWS()

About ListCodeReviews

Lists all the code reviews that the customer has created in the past 90 days.

Method Signature

IMPORTING

Required arguments:

iv_type TYPE /AWS1/GURTYPE /AWS1/GURTYPE

The type of code reviews to list in the response.

Optional arguments:

it_providertypes TYPE /AWS1/CL_GURPROVIDERTYPES_W=>TT_PROVIDERTYPES TT_PROVIDERTYPES

List of provider types for filtering that needs to be applied before displaying the result. For example, providerTypes=[GitHub] lists code reviews from GitHub.

it_states TYPE /AWS1/CL_GURJOBSTATES_W=>TT_JOBSTATES TT_JOBSTATES

List of states for filtering that needs to be applied before displaying the result. For example, states=[Pending] lists code reviews in the Pending state.

The valid code review states are:

  • Completed: The code review is complete.

  • Pending: The code review started and has not completed or failed.

  • Failed: The code review failed.

  • Deleting: The code review is being deleted.

it_repositorynames TYPE /AWS1/CL_GURREPOSITORYNAMES_W=>TT_REPOSITORYNAMES TT_REPOSITORYNAMES

List of repository names for filtering that needs to be applied before displaying the result.

iv_maxresults TYPE /AWS1/GURLISTCODEREVIEWSMAXRSS /AWS1/GURLISTCODEREVIEWSMAXRSS

The maximum number of results that are returned per call. The default is 100.

iv_nexttoken TYPE /AWS1/GURNEXTTOKEN /AWS1/GURNEXTTOKEN

If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

RETURNING

oo_output TYPE REF TO /aws1/cl_gurlistcodereviewsrsp /AWS1/CL_GURLISTCODEREVIEWSRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_gur~listcodereviews(
  it_providertypes = VALUE /aws1/cl_gurprovidertypes_w=>tt_providertypes(
    ( new /aws1/cl_gurprovidertypes_w( |string| ) )
  )
  it_repositorynames = VALUE /aws1/cl_gurrepositorynames_w=>tt_repositorynames(
    ( new /aws1/cl_gurrepositorynames_w( |string| ) )
  )
  it_states = VALUE /aws1/cl_gurjobstates_w=>tt_jobstates(
    ( new /aws1/cl_gurjobstates_w( |string| ) )
  )
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_type = |string|
).

This is an example of reading all possible response values

LOOP AT lo_result->get_codereviewsummaries( ) into lo_row.
  lv_name = lo_row_1->get_name( ).
  lv_arn = lo_row_1->get_codereviewarn( ).
  lv_name = lo_row_1->get_repositoryname( ).
  lv_owner = lo_row_1->get_owner( ).
  lv_providertype = lo_row_1->get_providertype( ).
  lv_jobstate = lo_row_1->get_state( ).
  lv_timestamp = lo_row_1->get_createdtimestamp( ).
  lv_timestamp = lo_row_1->get_lastupdatedtimestamp( ).
  lv_type = lo_row_1->get_type( ).
  lv_pullrequestid = lo_row_1->get_pullrequestid( ).
  lv_linesofcodecount = lo_metricssummary->get_meteredlinesofcodecount( ).
  lv_linesofcodecount = lo_metricssummary->get_supedlinesofcodecount( ).
  lv_findingscount = lo_metricssummary->get_findingscount( ).
  lv_commitid = lo_commitdiffsourcecodetyp->get_sourcecommit( ).
  lv_commitid = lo_commitdiffsourcecodetyp->get_destinationcommit( ).
  lv_commitid = lo_commitdiffsourcecodetyp->get_mergebasecommit( ).
  lv_branchname = lo_repositoryheadsourcecod->get_branchname( ).
  lv_branchname = lo_branchdiffsourcecodetyp->get_sourcebranchname( ).
  lv_branchname = lo_branchdiffsourcecodetyp->get_destinationbranchname( ).
  lv_name = lo_s3bucketrepository->get_name( ).
  lv_s3bucketname = lo_s3repositorydetails->get_bucketname( ).
  lv_sourcecodeartifactsobje = lo_codeartifacts->get_srccodeartifactsobjkey( ).
  lv_buildartifactsobjectkey = lo_codeartifacts->get_buildartifactsobjectkey( ).
  lv_requestid = lo_requestmetadata->get_requestid( ).
  lv_requester = lo_requestmetadata->get_requester( ).
  lv_eventname = lo_eventinfo->get_name( ).
  lv_eventstate = lo_eventinfo->get_state( ).
  lv_vendorname = lo_requestmetadata->get_vendorname( ).
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).