Skip to content

Configuration reference

This page lists everything you can configure on a GitProjectHealth importer. It is a reference: for a guided tour, read Importers first.

ConstructorReturnsPreset options
GitModelImporter forGitlabWithToken: token andModel: modelGitlabModelImporter on https://gitlab.com/api/v4same as below
GitModelImporter forGitlabHostOn: url withToken: token andModel: modelGitlabModelImporter on url (must end with /api/v4)withFiles: false, withCommitsSince: 3 days, withCommitDiffs: false
GitModelImporter forGithubWithToken: token andModel: modelGithubModelImporterwithCommitsSince: 3 days
GitModelImporter forBitbucketHostOn: url withToken: token andModel: modelBitBucketModelImporter on urlwithFiles: false, withCommitsSince: 3 days, withCommitDiffs: false
GitlabModelImporter newGitLab importer, API to set with repoApi:class defaults (see below)
GithubModelImporter newGitHub importer, token to set with privateToken:class defaults
BitBucketModelImporter newBitbucket importer, API to set with repoApi:class defaults
GitLocalModelImporter newlocal importerclass defaults
GitModelMixedImporter newmixed importer, set apiImporter: and localImporter:—

Options are set on the importer before importing. They are defined in GitModelImporter and apply to every importer, unless noted otherwise.

OptionTypeDefault (new)EffectCost
glhModel:GLHModel— (required)Model in which entities are added.—
repoApi:GitlabApi, GithubApi, BitbucketApiGitHub: created automaticallyAPI client used by platform importers.—
privateToken:String—GitHub only: sets the token of the GitHub API client.—
withCommitsSince:Duration (30 days, 2 years) or DateAndTime1 weekOldest commit to import. A duration is subtracted from today.high: more commits, more calls
withCommitDiffs:BooleanGitLab, GitHub, local: true; Bitbucket: unsetImport the diff (GLHDiff) of each commit, and of merge requests on GitLab and GitHub.high: one call per commit
withDiffRanges:BooleanfalseLocal importer: split diffs into ranges and line changes (GLHDiffRange, GLHAddition, GLHDeletion, GLHLineOfCode).memory
withFiles:BooleanfalseImport the file tree (GLHFileDirectory, GLHFileBlob) of each branch. Required for degree of authorship and truck factor.very high on APIs
beWithFiles / beWithoutFiles——Shortcuts for withFiles: true / withFiles: false.—
withInitialCommits:BooleanGitLab: falseGitLab: import the commits of every branch when a project is completed.very high
userCatalogue:GLHUserCatalogueGLHUserCatalogueV2Matches commit author names and e-mails with platform users.—

The local importer reads the path of the clone from the repository cache:

repository cacheAt: #localImporterReference put: '/path/to/clone' asFileReference.

If this entry is missing, the importer clones the project from its web_url into ./msr/<project name>, using your Iceberg credentials.

OptionEffect
apiImporter:Platform importer used for projects, merge requests, notes, pipelines, tags and users.
localImporter:Local importer used for branches, commits and diffs.
glhModel:Sets the model on the mixed importer and on both importers already set.
withCommitDiffs:, withDiffRanges:Forwarded to the local importer.

✅ supported, ❌ not supported. For the mixed importer, the column says which importer does the work. Arguments: project is a GLHProject, mr a GLHMergeRequest, commit a GLHCommit, branch a GLHBranch, dates are DateAndTime.

MethodGitLabGitHubBitbucketLocalMixed
importGroup:✅ ID, with sub-groups✅ org name✅ project key❌❌
importAllGroups (top-level groups, not their projects)✅❌❌❌❌
importProject:✅ ID❌❌ (import the group)❌API
importProjects / importProjectsSince:✅❌❌❌❌
importContributedProjectsOfUser:✅✅✅❌❌
importUser: (ID)✅✅❌❌API
importUserByUsername:✅✅✅❌API
importActiveHumanUsers✅❌❌❌❌
MethodGitLabGitHubBitbucketLocalMixed
importRepository: (branches + commits)❌❌❌✅❌
importBranchesOfProject:✅✅✅✅local
importFilesOfBranch:✅✅❌✅❌
importFileWithPath:ofProject:inBranch:✅❌❌❌❌
importTagsForProject:✅❌❌❌API
importLatestReleaseOfProject:✅❌❌❌❌
MethodGitLabGitHubBitbucketLocalMixed
importCommitsOfProject:since:until:✅❌✅✅local
importAndLoadLatestsCommitsOfProject:✅❌✅❌❌
importLatestCommitsOfProject:✅✅ (50 latest)❌✅❌
importCommitsOfProject: (period of withCommitsSince:)❌✅❌❌❌
importCommitsOfBranch: and …since:, …until:, …since:until:, …fromCommit:✅❌❌❌❌
importCommitsOfTag:, importCommitsFromTag:toTag:✅❌❌❌❌
importCommit:ofProject: (commit ID)✅✅✅✅local, then API
importDiffOfCommit:✅✅✅✅local, then API
importParentCommitsOfCommit:since:✅❌❌❌❌
importSZZFromCommit: (bug-introducing commits)✅❌❌❌❌
MethodGitLabGitHubBitbucketLocalMixed
importLatestMergeRequestsOfProject:✅ (20 latest)✅❌❌❌
importMergeRequestsOfProject:✅✅❌❌❌
importMergeRequestsOfProject:since:until:✅❌✅❌API
importMergeRequestCommits:✅❌✅❌API
importMergeRequestMergeCommits:✅✅✅❌API
importDiffOfMergeRequest:✅✅❌❌❌
importMergeResquestApprovals:✅❌❌❌❌
importMergeResquestAuthor:, importMergeResquestMerger:✅✅✅❌❌
importNotesOfMergeRequest:✅❌✅❌API
importMergeRequestStats:❌❌✅❌❌
MethodGitLabGitHubBitbucketLocalMixed
importLatestPipelinesOfProject:✅❌❌❌API
importPipelinesOfProject:✅✅❌❌❌
importAllPipelinesOfProject:✅✅❌❌❌
importPipelinesOfProject:after:andBefore: (…onBranch:)✅❌❌❌❌
importPipelinesOfMergeRequest:✅✅❌❌❌
importJobsOfPipeline:✅✅❌❌❌
importIssuesOfProject:❌✅❌❌❌