From 4081e080f4ad7cfae3d125b3f98dad3e618b6a5a Mon Sep 17 00:00:00 2001 From: Olblak Date: Wed, 11 Mar 2026 20:44:06 +0100 Subject: [PATCH] fix(githubsearch): add missing depth parameter support Signed-off-by: Olblak --- pkg/plugins/scms/githubsearch/spec.go | 9 +++++++++ pkg/plugins/scms/githubsearch/specGenerator.go | 1 + 2 files changed, 10 insertions(+) diff --git a/pkg/plugins/scms/githubsearch/spec.go b/pkg/plugins/scms/githubsearch/spec.go index 0dd369e094..8f52a7d03b 100644 --- a/pkg/plugins/scms/githubsearch/spec.go +++ b/pkg/plugins/scms/githubsearch/spec.go @@ -10,6 +10,15 @@ import ( // Spec represents the configuration input type Spec struct { + // Depth defines the depth used when cloning the git repository. + // + // Default: disabled (full clone) + // + // Remark: + // When using a shallow clone (depth greater than 0), Updatecli is not able to retrieve the full git history. + // This may cause some issues when Updatecli tries to push changes to the remote repository. + // In that case, you may need to set the force option to true to force push changes to the remote repository. + Depth *int `yaml:",omitempty"` // Limit defines the maximum number of repositories to return from the search query. // // compatible: diff --git a/pkg/plugins/scms/githubsearch/specGenerator.go b/pkg/plugins/scms/githubsearch/specGenerator.go index 7f35ddf2ea..51a6b7c262 100644 --- a/pkg/plugins/scms/githubsearch/specGenerator.go +++ b/pkg/plugins/scms/githubsearch/specGenerator.go @@ -43,6 +43,7 @@ func (g GitHubSearch) ScmsGenerator(ctx context.Context) (results []github.Spec, CommitMessage: g.spec.CommitMessage, CommitUsingAPI: g.spec.CommitUsingAPI, Directory: g.spec.Directory, + Depth: g.spec.Depth, Email: g.spec.Email, Force: g.spec.Force, GPG: g.spec.GPG,