@@ -390,51 +390,6 @@ GLHModelImporter >> importCommitsOProject: aProject since: fromDate until: toDat
390
390
^ self glhModel addAll: foundCommit unless: self blockOnIdEquality
391
391
]
392
392
393
- { #category : #api }
394
- GLHModelImporter >> importCommitsOf: aGLHProject withStats: aBoolean until: toDate [
395
-
396
- | newlyFoundCommit page |
397
-
398
- self deprecated: [ ] .
399
-
400
- page := 0 .
401
- newlyFoundCommit := { true }.
402
- [ newlyFoundCommit isNotEmpty ] whileTrue: [
403
- | results parsedResults existingCommits |
404
- page := page + 1 .
405
- (' import commit page ' , page printString) recordInfo.
406
- results := self glhApi
407
- commitsOfProject: aGLHProject id
408
- forRefName: nil
409
- since: nil
410
- until: nil
411
- path: nil
412
- author: nil
413
- all: nil
414
- with_stats: aBoolean
415
- firstParent: nil
416
- order: nil
417
- trailers: nil
418
- perPage: 100
419
- page: page.
420
- parsedResults := self parseCommitsResult: results.
421
- existingCommits := aGLHProject mooseModel allWithType: GLHCommit .
422
-
423
- newlyFoundCommit := parsedResults reject: [ :commitParsed |
424
- (toDate isNil or : [
425
- commitParsed committed_date
426
- < toDate asDateAndTime ]) or : [
427
- existingCommits anySatisfy: [ :existingCommit |
428
- existingCommit id = commitParsed id ] ] ].
429
- aGLHProject mooseModel addAll: newlyFoundCommit.
430
- aGLHProject repository commits addAll: newlyFoundCommit ].
431
-
432
-
433
- self withCommitDiffs ifTrue: [
434
- aGLHProject repository commits do: [ :commit |
435
- self importDiffOfCommit: commit ] ]
436
- ]
437
-
438
393
{ #category : #commit }
439
394
GLHModelImporter >> importCommitsOfBranch: aGLHBranch forRefName: refName since: fromDate [
440
395
@@ -601,32 +556,6 @@ GLHModelImporter >> importJobsOf: aPipeline [
601
556
602
557
]
603
558
604
- { #category : #commit }
605
- GLHModelImporter >> importParentCommitsOfCommit: aGLHCommit forOnly: number [
606
-
607
- | parentsIds commits |
608
- commits := OrderedCollection new .
609
- number = 0 ifTrue: [
610
- ^ commits
611
- add: aGLHCommit;
612
- yourself ].
613
-
614
- parentsIds := aGLHCommit parent_ids.
615
-
616
- commits addAll: (parentsIds collect: [ :id |
617
- self
618
- importCommitOfProject: aGLHCommit repository project
619
- withId: id.
620
- (self selectEntityType: GLHCommit overAttribut: #id equalTo: id)
621
- first ]).
622
-
623
-
624
- ^ commits , (commits collect: [ :parentCommit |
625
- self
626
- importParentCommitsOfCommit: parentCommit
627
- forOnly: number - 1 ]) flatten
628
- ]
629
-
630
559
{ #category : #commit }
631
560
GLHModelImporter >> importParentCommitsOfCommit: aGLHCommit since: aDate [
632
561
@@ -920,28 +849,6 @@ GLHModelImporter >> parseCommitsResult: result [
920
849
^ reader nextAs: #ArrayOfCommit
921
850
]
922
851
923
- { #category : #private }
924
- GLHModelImporter >> parseDiffResult: result [
925
-
926
- | reader |
927
- self
928
- deprecated: ' Use #newParseDiffResult: instead'
929
- on: ' 28 June 2024'
930
- in:
931
- ' Pharo-11.0.0+build.726.sha.aece1b5473acf3830a0e082c1bc3a15d4ff3522b (64 Bit)' .
932
- reader := NeoJSONReader on: result readStream.
933
- reader for: GLHDiff do: [ :mapping |
934
- mapping mapInstVars:
935
- #( deleted_file new_file new_path old_path renamed_file ) .
936
- mapping mapInstVar: #diffString to: #diff ].
937
-
938
- reader
939
- for: #ArrayOfDiffs
940
- customDo: [ :customMappting |
941
- customMappting listOfElementSchema: GLHDiff ].
942
- ^ reader nextAs: #ArrayOfDiffs
943
- ]
944
-
945
852
{ #category : #private }
946
853
GLHModelImporter >> parseFileTreeResult: aResult [
947
854
@@ -1053,13 +960,6 @@ GLHModelImporter >> pipelinesOf: aProjectID [
1053
960
^ self parsePipelinesResult: result
1054
961
]
1055
962
1056
- { #category : #' as yet unclassified' }
1057
- GLHModelImporter >> selectEntityType: aType overAttribut: aSelector equalTo: value [
1058
-
1059
- ^ (self glhModel allWithType: aType)
1060
- select: [ :entity | (entity perform: aSelector) = value ]
1061
- ]
1062
-
1063
963
{ #category : #' private - api' }
1064
964
GLHModelImporter >> subGroupsOf: aGroupID [
1065
965
0 commit comments