All files / src/background zcl_abapgit_background_pull.clas.abap

54.54% Statements 30/55
100% Branches 0/0
0% Functions 0/1
54.54% Lines 30/55

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 561x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x                                                   1x  
CLASS zcl_abapgit_background_pull DEFINITION
  PUBLIC
  CREATE PUBLIC .
 
  PUBLIC SECTION.
 
    INTERFACES zif_abapgit_background .
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.
 
 
 
CLASS zcl_abapgit_background_pull IMPLEMENTATION.
 
 
  METHOD zif_abapgit_background~get_description.
 
    rv_description = 'Automatic pull'.
 
  ENDMETHOD.
 
 
  METHOD zif_abapgit_background~get_settings.
    RETURN.
  ENDMETHOD.
 
 
  METHOD zif_abapgit_background~run.

    DATA: ls_checks             TYPE zif_abapgit_definitions=>ty_deserialize_checks,
          lo_settings           TYPE REF TO zcl_abapgit_settings,
          lv_activation_setting TYPE zif_abapgit_definitions=>ty_s_user_settings-activate_wo_popup.

    FIELD-SYMBOLS: <ls_overwrite> LIKE LINE OF ls_checks-overwrite.


    ls_checks = io_repo->deserialize_checks( ).

    LOOP AT ls_checks-overwrite ASSIGNING <ls_overwrite>.
      <ls_overwrite>-decision = zif_abapgit_definitions=>c_yes.
    ENDLOOP.

    lo_settings = zcl_abapgit_persist_factory=>get_settings( )->read( ).
    lv_activation_setting = lo_settings->get_activate_wo_popup( ).

    lo_settings->set_activate_wo_popup( abap_true ).

    io_repo->deserialize( is_checks = ls_checks
                          ii_log    = ii_log ).

    lo_settings->set_activate_wo_popup( lv_activation_setting ).

  ENDMETHOD.
ENDCLASS.