Skip to content

Commit

Permalink
feat: bitbucket importer (#74)
Browse files Browse the repository at this point in the history
* feat: add bitbucket package + base bitbucket api

* chore: add bitbucket package in baseline

* feat: get user method in bitBucket api

* feat: importUser for bitbucket importer

* feat: change bitbucket api for 1.0 + add projects method

* feat(BitBucketApi): repositories of a project

* feat(BitBucketApi): commits of repo in project since until date

* feat(BitBucketImporter): importContributedProjectsOfUser method

* refactor: improve repo/project transformation into GLHProject

* test: add tests for bitbucket api and importer

* feat: base completeImportProject

* feat: import commits of project in bit bucket importer

* feat(bitBucketImporter): import creator of commit method

* refactor: move testImportUser method

* refactor: rename importCommitsOfProject:since:until

* fix: change imporContributedProject test to work on any date

* feat(BitBucketApi): remove merge commit in commitsOfRepo:Inproject

* feat(bitBucketImporter): add getContributionFromDiff

* test: improve tests getContributionFromDiffs:

* feat(bitBucketModelImporter): add withInitialCommits

* feat(BitBucketApi): add usersByUserName

* feat(BitBucketModelImporter): importUserByUsername

* fix: problem with commitsInRepoOfProject

* fix: small fix in bitbucket importer

* fix: infinit loop with importContributedProjects

* feat(BitBucketModelImporter): fix importCreatorOfCommit + add tests

* test(BitBucketModelImporter): fix test importContributedProject

* feat: add parentsId in bit bucket importer  commit parsing

* feat(BitBucketApi): pullrequestsOfRepo:InProject:Since:Until

* feat(bitbucketModelImporter): importMergeRequests:since:until

* fix(bitBucketImporter): improve precision in dates

* feat(BitBucketModelImporter): add reviewers in parsing of pull requests

* feat(BitBucketApi):  activities of pull requests

* feat(BitBucketModelImporter): import merge request merger

* feat(BitBucketApi): commits of pull requests

* feat(BitBucketModelImporter): importMergeRequestCommits

* fix(BitBucketApi): error in commit created_at date

* test: improve mock structure

* refactor(BitBucketModelImporter): change classifications of methods

* chore: add bitbucket test package in baseline

* ci: add bitbucket packages in smalltalk.ston testing
  • Loading branch information
knowbased authored Oct 3, 2024
1 parent 0c3ed68 commit 89c52cd
Show file tree
Hide file tree
Showing 16 changed files with 2,461 additions and 63 deletions.
4 changes: 2 additions & 2 deletions .smalltalk.ston
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ SmalltalkCISpec {
}
],
#testing: {
#packages : [ 'GitLab.*', 'GLPH.*', 'GitHub.*', 'GitProject.*' ],
#packages : [ 'GitLab.*', 'GLPH.*', 'GitHub.*', 'GitProject.*', 'BitBucket.*' ],
#coverage : {
#packages : [ 'GitLab.*', 'GLPH.*', 'GitHub.*', 'GitProject.*' ],
#packages : [ 'GitLab.*', 'GLPH.*', 'GitHub.*', 'GitProject.*', 'BitBucket.*' ],
#format : #lcov
}
}
Expand Down
21 changes: 14 additions & 7 deletions src/BaselineOfGitLabHealth/BaselineOfGitLabHealth.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ BaselineOfGitLabHealth >> defineGroups: spec [
'GitLabHealth-Model-Analysis-Tests'
'GitLabHealth-Visualization' 'GitLabProjectHealth-ExtendModel-Generator'
'GitLabProjectHealth-Model-Importer'
'GitLabProjectHealth-Model-Importer-Tests' ).
'GitLabProjectHealth-Model-Importer-Tests'
'BitBucketHealth-Model-Importer' 'BitBucketHealth-Model-Importer-Tests' ).
spec group: 'default' with: #( 'Core' )
]

Expand Down Expand Up @@ -123,7 +124,6 @@ BaselineOfGitLabHealth >> definePackages: spec [

spec package: 'GitProjectHealth-Model-Importer'.


"gitlab"
spec
package: 'GitLabHealth-Model';
Expand All @@ -135,17 +135,23 @@ BaselineOfGitLabHealth >> definePackages: spec [
package: 'GitLabHealth-Model-Inspector'
with: [ spec requires: #( 'GitLabHealth-Model-Visualization' ) ];
package: 'GitLabHealth-Model-Visualization';
package: 'GitLabHealth-Model-Importer'
with: [ spec requires: #( 'NeoJSON' 'MoreLogger' 'GitProjectHealth-Model-Importer' ) ];
package: 'GitHubHealth-Model-Importer'
with: [ spec requires: #( 'NeoJSON' 'MoreLogger' 'GitProjectHealth-Model-Importer' ) ];
package: 'GitLabHealth-Model-Importer' with: [
spec requires:
#( 'NeoJSON' 'MoreLogger' 'GitProjectHealth-Model-Importer' ) ];
package: 'GitHubHealth-Model-Importer' with: [
spec requires:
#( 'NeoJSON' 'MoreLogger' 'GitProjectHealth-Model-Importer' ) ];
package: 'GitLabHealth-Model-Importer-Tests' with: [
spec requires:
#( 'GitLabHealth-Model-Importer' 'GitHubHealth-Model-Importer' ) ].
spec
package: 'GitHubHealth-Model-Importer-Tests'
with: [ spec requires: #( 'GitHubHealth-Model-Importer' ) ].

"bitBucket"
spec package: 'BitBucketHealth-Model-Importer';
package: 'BitBucketHealth-Model-Importer-Tests' with: [ spec requires: #( 'BitBucketHealth-Model-Importer' ) ].

"model extension"
spec
package: 'GLPHExtended-Model' with: [
Expand All @@ -156,7 +162,8 @@ BaselineOfGitLabHealth >> definePackages: spec [
package: 'GLPHExtended-Model-Extension' with: [
spec requires:
#( 'GLPHExtended-Model' 'GitLabHealth-Model' 'GitLabHealth-Model-Extension' ) ];
package: 'GitLabHealth-Model-Analysis' with: [ spec requires: #( 'Voyage' 'AWS' ) ];
package: 'GitLabHealth-Model-Analysis'
with: [ spec requires: #( 'Voyage' 'AWS' ) ];
package: 'GitLabHealth-Model-Analysis-Tests'
with: [ spec requires: #( 'GitLabHealth-Model-Analysis' ) ];
package: 'GitLabHealth-Visualization';
Expand Down
Loading

0 comments on commit 89c52cd

Please sign in to comment.