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 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | 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 | const {cx_root} = await import("./cx_root.clas.mjs"); // zcl_abapgit_background_push_au.clas.abap class zcl_abapgit_background_push_au { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'ZCL_ABAPGIT_BACKGROUND_PUSH_AU'; static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_BACKGROUND"]; static ATTRIBUTES = {"MI_LOG": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"});}, "visibility": "O", "is_constant": " ", "is_class": " "}}; static METHODS = {"BUILD_COMMENT": {"visibility": "O", "parameters": {"RV_COMMENT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IS_FILES": {"type": () => {return new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {});}, "is_optional": " "}}}, "PUSH_AUTO": {"visibility": "O", "parameters": {"II_REPO_ONLINE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"});}, "is_optional": " "}}}, "DETERMINE_USER_DETAILS": {"visibility": "O", "parameters": {"RS_USER": {"type": () => {return new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {});}, "is_optional": " "}, "IV_CHANGED_BY": {"type": () => {return new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"});}, "is_optional": " "}}}, "PUSH_DELETIONS": {"visibility": "O", "parameters": {"II_REPO_ONLINE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"});}, "is_optional": " "}, "IS_FILES": {"type": () => {return new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {});}, "is_optional": " "}}}}; constructor() { this.me = new abap.types.ABAPObject(); this.me.set(this); this.INTERNAL_ID = abap.internalIdCounter++; this.FRIENDS_ACCESS_INSTANCE = { "build_comment": this.build_comment.bind(this), "push_auto": this.push_auto.bind(this), "determine_user_details": this.determine_user_details.bind(this), "push_deletions": this.push_deletions.bind(this), }; this.mi_log = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"}); } async constructor_(INPUT) { if (super.constructor_) { await super.constructor_(INPUT); } return this; } async build_comment(INPUT) { let rv_comment = new abap.types.String({qualifiedName: "STRING"}); let is_files = INPUT?.is_files; if (is_files?.getQualifiedName === undefined || is_files.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_STAGE_FILES") { is_files = undefined; } if (is_files === undefined) { is_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}).set(INPUT.is_files); } let lt_objects = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, ""); let lv_str = new abap.types.String({qualifiedName: "STRING"}); let fs_ls_local_ = new abap.types.FieldSymbol(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {})); for await (const unique19 of abap.statements.loop(is_files.get().local)) { fs_ls_local_.assign(unique19); lv_str.set(new abap.types.String().set(`${abap.templateFormatting(fs_ls_local_.get().item.get().obj_type)} ${abap.templateFormatting(fs_ls_local_.get().item.get().obj_name)}`)); abap.statements.append({source: lv_str, target: lt_objects}); } abap.statements.sort(lt_objects,{}); await abap.statements.deleteInternal(lt_objects,{adjacent: true}); if (abap.compare.eq(abap.builtin.lines({val: lt_objects}), abap.IntegerFactory.get(1))) { rv_comment.set(new abap.types.String().set(`BG: ${abap.templateFormatting(lv_str)}`)); } else { rv_comment.set(abap.CharacterFactory.get(20, 'BG: Multiple objects')); for await (const unique20 of abap.statements.loop(lt_objects)) { lv_str.set(unique20); abap.statements.concatenate({source: [rv_comment, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, lv_str], target: rv_comment}); } } return rv_comment; } async determine_user_details(INPUT) { let rs_user = new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {}); let iv_changed_by = INPUT?.iv_changed_by; if (iv_changed_by?.getQualifiedName === undefined || iv_changed_by.getQualifiedName() !== "SYUNAME") { iv_changed_by = undefined; } if (iv_changed_by === undefined) { iv_changed_by = new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"}).set(INPUT.iv_changed_by); } let li_user_record = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_USER_RECORD", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_USER_RECORD"}); li_user_record.set((await abap.Classes['ZCL_ABAPGIT_ENV_FACTORY'].get_user_record())); rs_user.get().name.set((await li_user_record.get().zif_abapgit_user_record$get_name({iv_username: iv_changed_by}))); rs_user.get().email.set((await li_user_record.get().zif_abapgit_user_record$get_email({iv_username: iv_changed_by}))); if (abap.compare.initial(rs_user.get().email)) { rs_user.get().email.set(new abap.types.String().set(`${abap.templateFormatting(iv_changed_by)}@localhost`)); } if (abap.compare.initial(rs_user.get().name)) { rs_user.get().name.set(iv_changed_by); } return rs_user; } async push_auto(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 ls_comment = new abap.types.Structure({ "committer": new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {}), "author": new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {}), "comment": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_COMMENT-COMMENT"})}, "zif_abapgit_git_definitions=>ty_comment", undefined, {}, {}); let ls_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}); let lt_changed = abap.types.TableFactory.construct(new abap.types.Structure({ "filename": new abap.types.String({qualifiedName: "TY_CHANGED-FILENAME"}), "path": new abap.types.String({qualifiedName: "TY_CHANGED-PATH"}), "changed_by": new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"})}, "ty_changed", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["FILENAME","PATH","CHANGED_BY"]},"secondary":[]}, ""); let ls_changed = new abap.types.Structure({ "filename": new abap.types.String({qualifiedName: "TY_CHANGED-FILENAME"}), "path": new abap.types.String({qualifiedName: "TY_CHANGED-PATH"}), "changed_by": new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"})}, "ty_changed", undefined, {}, {}); let lt_users = abap.types.TableFactory.construct(new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, ""); let ls_user_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}); let lv_changed_by = new abap.types.Character(12, {"qualifiedName":"SYUNAME","ddicName":"SYUNAME","description":"SYUNAME"}); let lo_stage = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STAGE", RTTIName: "\\CLASS=ZCL_ABAPGIT_STAGE"}); let fs_ls_remote_ = new abap.types.FieldSymbol(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {})); let fs_ls_local_ = new abap.types.FieldSymbol(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {})); ls_files.set((await (await abap.Classes['ZCL_ABAPGIT_STAGE_LOGIC'].get_stage_logic()).get().zif_abapgit_stage_logic$get({ii_repo_online: ii_repo_online}))); for await (const unique21 of abap.statements.loop(ls_files.get().local)) { fs_ls_local_.assign(unique21); lv_changed_by.set((await abap.Classes['ZCL_ABAPGIT_OBJECTS'].changed_by({is_item: fs_ls_local_.get().item, iv_filename: fs_ls_local_.get().file.get().filename}))); abap.statements.append({source: lv_changed_by, target: lt_users}); ls_changed.clear(); ls_changed.get().changed_by.set(lv_changed_by); ls_changed.get().filename.set(fs_ls_local_.get().file.get().filename); ls_changed.get().path.set(fs_ls_local_.get().file.get().path); abap.statements.insertInternal({data: ls_changed, table: lt_changed}); } abap.statements.sort(lt_users,{}); await abap.statements.deleteInternal(lt_users,{adjacent: true}); for await (const unique22 of abap.statements.loop(lt_users)) { lv_changed_by.set(unique22); ls_comment.clear(); ls_comment.get().committer.set((await this.determine_user_details({iv_changed_by: lv_changed_by}))); lo_stage.set(await (new abap.Classes['ZCL_ABAPGIT_STAGE']()).constructor_()); ls_user_files.clear(); for await (const unique23 of abap.statements.loop(ls_files.get().local)) { fs_ls_local_.assign(unique23); abap.statements.readTable(lt_changed,{withKey: (i) => {return abap.compare.eq(i.path, fs_ls_local_.get().file.get().path) && abap.compare.eq(i.filename, fs_ls_local_.get().file.get().filename) && abap.compare.eq(i.changed_by, lv_changed_by);}, withKeyValue: [{key: (i) => {return i.path}, value: fs_ls_local_.get().file.get().path},{key: (i) => {return i.filename}, value: fs_ls_local_.get().file.get().filename},{key: (i) => {return i.changed_by}, value: lv_changed_by}], usesTableLine: false, withKeySimple: {"path": fs_ls_local_.get().file.get().path,"filename": fs_ls_local_.get().file.get().filename,"changed_by": lv_changed_by}}); if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { await this.mi_log.get().zif_abapgit_log$add_info({iv_msg: new abap.types.String().set(`stage: ${abap.templateFormatting(ls_comment.get().committer.get().name)} ${abap.templateFormatting(fs_ls_local_.get().file.get().path)} ${abap.templateFormatting(fs_ls_local_.get().file.get().filename)}`)}); await lo_stage.get().add({iv_path: fs_ls_local_.get().file.get().path, iv_filename: fs_ls_local_.get().file.get().filename, iv_data: fs_ls_local_.get().file.get().data}); abap.statements.append({source: fs_ls_local_, target: ls_user_files.get().local}); for await (const unique24 of abap.statements.loop(ls_files.get().remote,{usingKey: "file",where: async (I) => {return abap.compare.eq(I.filename, fs_ls_local_.get().file.get().filename) && abap.compare.ne(I.path, fs_ls_local_.get().file.get().path) && abap.compare.ne(I.filename, abap.CharacterFactory.get(16, 'package.devc.xml'));},topEquals: {"filename": fs_ls_local_.get().file.get().filename}})) { fs_ls_remote_.assign(unique24); await this.mi_log.get().zif_abapgit_log$add_info({iv_msg: new abap.types.String().set(`rm: ${abap.templateFormatting(fs_ls_remote_.get().path)} ${abap.templateFormatting(fs_ls_remote_.get().filename)}`)}); await lo_stage.get().rm({iv_path: fs_ls_remote_.get().path, iv_filename: fs_ls_remote_.get().filename}); break; } } } ls_comment.get().comment.set((await this.build_comment({is_files: ls_user_files}))); await ii_repo_online.get().zif_abapgit_repo_online$push({is_comment: ls_comment, io_stage: lo_stage}); } if (abap.compare.gt(abap.builtin.lines({val: ls_files.get().remote}), abap.IntegerFactory.get(0))) { await this.push_deletions({ii_repo_online: ii_repo_online, is_files: ls_files}); } } async push_deletions(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 is_files = INPUT?.is_files; if (is_files?.getQualifiedName === undefined || is_files.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_STAGE_FILES") { is_files = undefined; } if (is_files === undefined) { is_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}).set(INPUT.is_files); } let lo_stage = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STAGE", RTTIName: "\\CLASS=ZCL_ABAPGIT_STAGE"}); let ls_comment = new abap.types.Structure({ "committer": new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {}), "author": new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {}), "comment": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_COMMENT-COMMENT"})}, "zif_abapgit_git_definitions=>ty_comment", undefined, {}, {}); let fs_ls_remote_ = new abap.types.FieldSymbol(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {})); abap.statements.assert(abap.compare.gt(abap.builtin.lines({val: is_files.get().remote}), abap.IntegerFactory.get(0))); lo_stage.set(await (new abap.Classes['ZCL_ABAPGIT_STAGE']()).constructor_()); ls_comment.get().comment.set(abap.CharacterFactory.get(12, 'BG: Deletion')); for await (const unique25 of abap.statements.loop(is_files.get().remote)) { fs_ls_remote_.assign(unique25); await this.mi_log.get().zif_abapgit_log$add_info({iv_msg: new abap.types.String().set(`removed: ${abap.templateFormatting(fs_ls_remote_.get().path)} ${abap.templateFormatting(fs_ls_remote_.get().filename)}`)}); await lo_stage.get().rm({iv_path: fs_ls_remote_.get().path, iv_filename: fs_ls_remote_.get().filename}); abap.statements.concatenate({source: [ls_comment.get().comment, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, fs_ls_remote_.get().filename], target: ls_comment.get().comment}); } ls_comment.get().committer.get().name.set(abap.CharacterFactory.get(8, 'Deletion')); ls_comment.get().committer.get().email.set(abap.CharacterFactory.get(18, 'deletion@localhost')); await ii_repo_online.get().zif_abapgit_repo_online$push({is_comment: ls_comment, io_stage: lo_stage}); } async zif_abapgit_background$get_description() { return zcl_abapgit_background_push_au.zif_abapgit_background$get_description(); } static async zif_abapgit_background$get_description() { let rv_description = new abap.types.String({qualifiedName: "STRING"}); rv_description.set(abap.CharacterFactory.get(27, 'Automatic push, auto author')); return rv_description; } async zif_abapgit_background$get_settings(INPUT) { return zcl_abapgit_background_push_au.zif_abapgit_background$get_settings(INPUT); } static async zif_abapgit_background$get_settings(INPUT) { let ct_settings = abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt"); if (INPUT && INPUT.ct_settings) {ct_settings = INPUT.ct_settings;} return; } async zif_abapgit_background$run(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 ii_log = INPUT?.ii_log; if (ii_log?.getQualifiedName === undefined || ii_log.getQualifiedName() !== "ZIF_ABAPGIT_LOG") { ii_log = undefined; } if (ii_log === undefined) { ii_log = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"}).set(INPUT.ii_log); } let it_settings = abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt"); if (INPUT && INPUT.it_settings) {it_settings.set(INPUT.it_settings);} let ls_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "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, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}); this.mi_log.set(ii_log); ls_files.set((await (await abap.Classes['ZCL_ABAPGIT_STAGE_LOGIC'].get_stage_logic()).get().zif_abapgit_stage_logic$get({ii_repo_online: ii_repo_online}))); if (abap.compare.eq(abap.builtin.lines({val: ls_files.get().local}), abap.IntegerFactory.get(0)) && abap.compare.eq(abap.builtin.lines({val: ls_files.get().remote}), abap.IntegerFactory.get(0))) { await ii_log.get().zif_abapgit_log$add_info({iv_msg: abap.CharacterFactory.get(16, 'Nothing to stage')}); return; } await this.push_auto({ii_repo_online: ii_repo_online}); } } abap.Classes['ZCL_ABAPGIT_BACKGROUND_PUSH_AU'] = zcl_abapgit_background_push_au; export {zcl_abapgit_background_push_au}; |