Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRevParseFailed = errors.New("git rev-parse HEAD failed")
Functions ¶
func CommitIdentifier ¶
CommitIdentifier creates the unique identifier as a combination of the unique repo name and a short sha for display purposes
Types ¶
type Opts ¶
type Opts struct { Logger hclog.Logger CustomerID string RepoID string // UniqueName is a name that will be used in the cache folder name. It should include the all info needed to find the repo in customer org. For example for github it should be NameWithOwner. It's preferrable to have a unique name for integration, but not required since we add id (and also refType) when storing in cache dir. UniqueName string // RefType to use when creating objects. // For example: // github, tfs RefType string LastProcessed *jsonstore.Store RepoAccess gitclone.AccessDetails // LocalRepo is a path to local repo for easier testing with agent-dev export-repo LocalRepo string // CommitURLTemplate is a template for building commit url // https://example.com/repo1/@@@sha@@@ CommitURLTemplate string // BranchURLTemplate is a template for building branch url // https://example.com/repo1/@@@branch@@@ BranchURLTemplate string Sessions SessionManger SessionRootID expsessions.ID // PRs to process similar to branches. PRs []PR CommitUsers *process.CommitUsers }
type Result ¶
type Result struct { // RepoNameUsedInCacheDir name suitable for file system. RepoNameUsedInCacheDir string // Duration is the information on time taken. Duration ExportDuration // SessionErr contains an error if it was not possible to open/close sessions. // We fail full export on these errors, since these would be related to fs errors // and would lead to invalid session files. SessionErr error // OtherErr is mostly risprc error or other errors in processing that is not related to closing sessions properly. OtherErr error }
Result is the result of the export run.
type SessionManger ¶
type SessionManger interface { Session(modelType string, parentSessionID expsessions.ID, parentObjectID, parentObjectName string) (_ expsessions.ID, lastProcessed interface{}, _ error) Write(id expsessions.ID, objs []map[string]interface{}) error // lastProcessed is not used in this package Done(id expsessions.ID, lastProcessed interface{}) error }
Click to show internal directories.
Click to hide internal directories.