bitsbeats / drone-tree-config

Drone helper for mono repositories.
Apache License 2.0
103 stars 24 forks source link

Gitlab support? #12

Closed jameshwc closed 4 years ago

jameshwc commented 4 years ago

I need to apply drone to a monorepo in gitlab. I'm willing to fork this repo, however, I'm newbie to go. Would you mind giving me some info or hint to help me kick off?

foosinn commented 4 years ago

Hey,

you will need to implement a new provider following this interface:

type ScmClient interface {
    ChangedFilesInPullRequest(ctx context.Context, pullRequestID int) ([]string, error)
    ChangedFilesInDiff(ctx context.Context, base string, head string) ([]string, error)
    GetFileContents(ctx context.Context, path string, commitRef string) (
        fileContent string, err error)
    GetFileListing(ctx context.Context, path string, commitRef string) (
        fileListing []FileListingEntry, err error)
}

Github example:

https://github.com/bitsbeats/drone-tree-config/blob/master/plugin/scm_clients/github_client.go

jezhodges commented 4 years ago

See #19

foosinn commented 4 years ago

Closed by #19

foosinn commented 4 years ago

Thanks!