All files / output zcl_abapgit_flow_git.clas.mjs

70.16% Statements 174/248
47.36% Branches 9/19
31.57% Functions 6/19
70.16% Lines 174/248

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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 2481x 1x 1x 1x 1x 1x 1x 1x 1x             1x       1x 1x         1x       1x                                                           1x 1x             1x       1x     1x 4x 4x 4x 4x 4x 4x           4x       4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 6x 6x 6x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 2x 2x 2x 2x 4x 1x     1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x         2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x         2x 2x 1x 1x 1x
await import("./zcl_abapgit_flow_git.clas.locals.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_flow_git.clas.abap
class zcl_abapgit_flow_git {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_FLOW_GIT';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"MAP_FILES_TO_OBJECTS": {"visibility": "I", "parameters": {"RT_CHANGED_OBJECTS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "obj_type": new abap.types.Character(4, {}),
  "obj_name": new abap.types.Character(40, {}),
  "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "srcsystem": new abap.types.Character(5, {}),
  "origlang": new abap.types.Character(1, {}),
  "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_items_ts");}, "is_optional": " "}, "IT_FILES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
  "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt");}, "is_optional": " "}, "II_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "is_optional": " "}}},
  "FIND_CHANGES_IN_GIT": {"visibility": "U", "parameters": {"II_REPO_ONLINE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"});}, "is_optional": " "}, "IT_BRANCHES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-NAME"}),
  "type": new abap.types.Character(2, {"qualifiedName":"zif_abapgit_git_definitions=>ty_git_branch_type"}),
  "is_head": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-DISPLAY_NAME"})}, "zif_abapgit_git_definitions=>ty_git_branch", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"name_key","type":"SORTED","isUnique":false,"keyFields":["NAME"]}]}, "zif_abapgit_git_definitions=>ty_git_branch_list_tt");}, "is_optional": " "}, "ET_MAIN_EXPANDED": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_EXPANDED-PATH"}),
  "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_EXPANDED-NAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"})}, "zif_abapgit_git_definitions=>ty_expanded", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"path_name","type":"SORTED","isUnique":false,"keyFields":["PATH","NAME"]}]}, "zif_abapgit_git_definitions=>ty_expanded_tt");}, "is_optional": " "}, "CT_FEATURES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "repo": new abap.types.Structure({
  "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-REPO-NAME"}),
  "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}),
  "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zif_abapgit_flow_logic=>ty_feature-repo", undefined, {}, {}),
  "branch": new abap.types.Structure({
  "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_BRANCH-DISPLAY_NAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "up_to_date": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_branch", undefined, {}, {}),
  "pr": new abap.types.Structure({
  "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-TITLE"}),
  "url": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-URL"}),
  "number": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-NUMBER"}),
  "draft": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_feature-pr", undefined, {}, {}),
  "transport": new abap.types.Structure({
  "trkorr": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
  "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-TRANSPORT-TITLE"})}, "zif_abapgit_flow_logic=>ty_feature-transport", undefined, {}, {}),
  "full_match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "changed_files": abap.types.TableFactory.construct(new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
  "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt"),
  "changed_objects": abap.types.TableFactory.construct(new abap.types.Structure({
  "obj_type": new abap.types.Character(4, {}),
  "obj_name": new abap.types.Character(40, {}),
  "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
  "srcsystem": new abap.types.Character(5, {}),
  "origlang": new abap.types.Character(1, {}),
  "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
  "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_items_ts")}, "zif_abapgit_flow_logic=>ty_feature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_features");}, "is_optional": " "}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async find_changes_in_git(INPUT) {
    return zcl_abapgit_flow_git.find_changes_in_git(INPUT);
  }
  static async find_changes_in_git(INPUT) {
    let ii_repo_online = INPUT?.ii_repo_online;
    if (ii_repo_online?.getQualifiedName === undefined || ii_repo_online.getQualifiedName() !== "ZIF_ABAPGIT_REPO_ONLINE") { ii_repo_online = undefined; }
    if (ii_repo_online === undefined) { ii_repo_online = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"}).set(INPUT.ii_repo_online); }
    let it_branches = INPUT?.it_branches;
    if (it_branches?.getQualifiedName === undefined || it_branches.getQualifiedName() !== "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH_LIST_TT") { it_branches = undefined; }
    if (it_branches === undefined) { it_branches = abap.types.TableFactory.construct(new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-NAME"}),
    "type": new abap.types.Character(2, {"qualifiedName":"zif_abapgit_git_definitions=>ty_git_branch_type"}),
    "is_head": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-DISPLAY_NAME"})}, "zif_abapgit_git_definitions=>ty_git_branch", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"name_key","type":"SORTED","isUnique":false,"keyFields":["NAME"]}]}, "zif_abapgit_git_definitions=>ty_git_branch_list_tt").set(INPUT.it_branches); }
    let et_main_expanded = INPUT?.et_main_expanded || abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_EXPANDED-PATH"}),
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_EXPANDED-NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "chmod": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_chmod"})}, "zif_abapgit_git_definitions=>ty_expanded", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"path_name","type":"SORTED","isUnique":false,"keyFields":["PATH","NAME"]}]}, "zif_abapgit_git_definitions=>ty_expanded_tt");
    let ct_features = abap.types.TableFactory.construct(new abap.types.Structure({
    "repo": new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-REPO-NAME"}),
    "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}),
    "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zif_abapgit_flow_logic=>ty_feature-repo", undefined, {}, {}),
    "branch": new abap.types.Structure({
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_BRANCH-DISPLAY_NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "up_to_date": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_branch", undefined, {}, {}),
    "pr": new abap.types.Structure({
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-TITLE"}),
    "url": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-URL"}),
    "number": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-NUMBER"}),
    "draft": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_feature-pr", undefined, {}, {}),
    "transport": new abap.types.Structure({
    "trkorr": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-TRANSPORT-TITLE"})}, "zif_abapgit_flow_logic=>ty_feature-transport", undefined, {}, {}),
    "full_match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "changed_files": abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt"),
    "changed_objects": abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_items_ts")}, "zif_abapgit_flow_logic=>ty_feature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_features");
    if (INPUT && INPUT.ct_features) {ct_features = INPUT.ct_features;}
    let ls_branch = new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-NAME"}),
    "type": new abap.types.Character(2, {"qualifiedName":"zif_abapgit_git_definitions=>ty_git_branch_type"}),
    "is_head": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-DISPLAY_NAME"})}, "zif_abapgit_git_definitions=>ty_git_branch", undefined, {}, {});
    let lt_sha1 = abap.types.TableFactory.construct(new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_git_definitions=>ty_sha1_tt");
    let lt_objects = abap.types.TableFactory.construct(new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "type": new abap.types.Character(6, {"qualifiedName":"zif_abapgit_git_definitions=>ty_type"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-DATA"}),
    "adler32": new abap.types.Hex({length: 4}),
    "index": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OBJECT-INDEX"})}, "zif_abapgit_definitions=>ty_object", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"sha","type":"SORTED","isUnique":false,"keyFields":["SHA1"]},{"name":"type","type":"SORTED","isUnique":false,"keyFields":["TYPE","SHA1"]}]}, "zif_abapgit_definitions=>ty_objects_tt");
    let lv_starting_folder = new abap.types.String({qualifiedName: "STRING"});
    let ls_main = new abap.types.Structure({
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-NAME"}),
    "type": new abap.types.Character(2, {"qualifiedName":"zif_abapgit_git_definitions=>ty_git_branch_type"}),
    "is_head": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_BRANCH-DISPLAY_NAME"})}, "zif_abapgit_git_definitions=>ty_git_branch", undefined, {}, {});
    let li_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});
    let lo_find = new abap.types.ABAPObject({qualifiedName: "LCL_FIND_CHANGES", RTTIName: "\\CLASS-POOL=ZCL_ABAPGIT_FLOW_GIT\\CLASS=LCL_FIND_CHANGES"});
    let fs_ls_branch_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "repo": new abap.types.Structure({
    "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-REPO-NAME"}),
    "key": new abap.types.Character(12, {"qualifiedName":"zif_abapgit_persistence=>ty_value"}),
    "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"})}, "zif_abapgit_flow_logic=>ty_feature-repo", undefined, {}, {}),
    "branch": new abap.types.Structure({
    "display_name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_BRANCH-DISPLAY_NAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "up_to_date": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_branch", undefined, {}, {}),
    "pr": new abap.types.Structure({
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-TITLE"}),
    "url": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-URL"}),
    "number": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-PR-NUMBER"}),
    "draft": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"})}, "zif_abapgit_flow_logic=>ty_feature-pr", undefined, {}, {}),
    "transport": new abap.types.Structure({
    "trkorr": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "title": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_FEATURE-TRANSPORT-TITLE"})}, "zif_abapgit_flow_logic=>ty_feature-transport", undefined, {}, {}),
    "full_match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "changed_files": abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt"),
    "changed_objects": abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_items_ts")}, "zif_abapgit_flow_logic=>ty_feature", undefined, {}, {}));
    et_main_expanded.clear();
    li_repo.set(ii_repo_online);
    for await (const unique698 of abap.statements.loop(it_branches,{where: async (I) => {return abap.compare.eq(I.is_head, abap.builtin.abap_false);},topEquals: {"is_head": abap.builtin.abap_false}})) {
      ls_branch.set(unique698);
      abap.statements.append({source: ls_branch.get().sha1, target: lt_sha1});
    }
    lt_objects.set((await (await abap.Classes['ZCL_ABAPGIT_GIT_FACTORY'].get_v2_porcelain()).get().zif_abapgit_gitv2_porcelain$list_no_blobs_multi({iv_url: (await ii_repo_online.get().zif_abapgit_repo_online$get_url()), it_sha1: lt_sha1})));
    lv_starting_folder.set(abap.operators.concat((await (await li_repo.get().zif_abapgit_repo$get_dot_abapgit()).get().get_starting_folder()),abap.CharacterFactory.get(1, '*')));
    abap.statements.readTable(it_branches,{into: ls_main,
      withKey: (i) => {return abap.compare.eq(i.display_name, abap.Classes['ZIF_ABAPGIT_FLOW_LOGIC'].zif_abapgit_flow_logic$c_main);},
      withKeyValue: [{key: (i) => {return i.display_name}, value: abap.Classes['ZIF_ABAPGIT_FLOW_LOGIC'].zif_abapgit_flow_logic$c_main}],
      usesTableLine: false,
      withKeySimple: {"display_name": abap.Classes['ZIF_ABAPGIT_FLOW_LOGIC'].zif_abapgit_flow_logic$c_main}});
    abap.statements.assert(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)));
    et_main_expanded.set((await abap.Classes['ZCL_ABAPGIT_GIT_PORCELAIN'].full_tree({it_objects: lt_objects, iv_parent: ls_main.get().sha1})));
    await abap.statements.deleteInternal(et_main_expanded,{where: async (I) => {return abap.compare.np(I.path, lv_starting_folder);}});
    lo_find.set(await (new abap.Classes['CLAS-ZCL_ABAPGIT_FLOW_GIT-LCL_FIND_CHANGES']()).constructor_({it_objects: lt_objects}));
    for await (const unique699 of abap.statements.loop(ct_features,{where: async (I) => {return abap.compare.ne(I.branch.get().display_name, abap.Classes['ZIF_ABAPGIT_FLOW_LOGIC'].zif_abapgit_flow_logic$c_main);}})) {
      fs_ls_branch_.assign(unique699);
      fs_ls_branch_.get().changed_files.set((await lo_find.get().find_changes({iv_main: ls_main.get().sha1, iv_branch: fs_ls_branch_.get().branch.get().sha1, iv_starting_folder: lv_starting_folder})));
      fs_ls_branch_.get().changed_objects.set((await this.map_files_to_objects({ii_repo: li_repo, it_files: fs_ls_branch_.get().changed_files})));
    }
  }
  async map_files_to_objects(INPUT) {
    return zcl_abapgit_flow_git.map_files_to_objects(INPUT);
  }
  static async map_files_to_objects(INPUT) {
    let rt_changed_objects = abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_items_ts");
    let it_files = INPUT?.it_files;
    if (it_files?.getQualifiedName === undefined || it_files.getQualifiedName() !== "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME_TT") { it_files = undefined; }
    if (it_files === undefined) { it_files = abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_flow_logic=>ty_path_name_tt").set(INPUT.it_files); }
    let ii_repo = INPUT?.ii_repo;
    if (ii_repo?.getQualifiedName === undefined || ii_repo.getQualifiedName() !== "ZIF_ABAPGIT_REPO") { ii_repo = undefined; }
    if (ii_repo === undefined) { ii_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}).set(INPUT.ii_repo); }
    let ls_item = new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {});
    let lv_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});
    let lo_dot = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_DOT_ABAPGIT", RTTIName: "\\CLASS=ZCL_ABAPGIT_DOT_ABAPGIT"});
    let fs_ls_file_ = new abap.types.FieldSymbol(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_FLOW_LOGIC=>TY_PATH_NAME-FILENAME"}),
    "remote_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "local_sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_flow_logic=>ty_path_name", undefined, {}, {}));
    lv_package.set((await ii_repo.get().zif_abapgit_repo$get_package()));
    lo_dot.set((await ii_repo.get().zif_abapgit_repo$get_dot_abapgit()));
    for await (const unique700 of abap.statements.loop(it_files)) {
      fs_ls_file_.assign(unique700);
      await abap.Classes['ZCL_ABAPGIT_FILENAME_LOGIC'].file_to_object({iv_filename: fs_ls_file_.get().filename, iv_path: fs_ls_file_.get().path, iv_devclass: lv_package, io_dot: lo_dot, es_item: ls_item});
      abap.statements.insertInternal({data: ls_item, table: rt_changed_objects});
    }
    return rt_changed_objects;
  }
}
abap.Classes['ZCL_ABAPGIT_FLOW_GIT'] = zcl_abapgit_flow_git;
export {zcl_abapgit_flow_git};