Skip to content

Conversation

@olblak
Copy link
Member

@olblak olblak commented Feb 6, 2026

Allow scm configuration to specify cloning depths.

Test

Tested manually with the following config

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added enhancement New feature or request scm-github SCM of type GiHhub scm-git SCM of kind "Git" scm-gittea scm-gitlab scm-stash scm-bitbucket All things related to the bitbucket integration labels Feb 6, 2026
@olblak olblak requested a review from Copilot February 6, 2026 16:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds the ability to specify git clone depth for SCM configurations and sets a default depth of 1 for the gittag resource to improve performance by reducing clone sizes. The PR description indicates that with this change, the gittag resource clone size is reduced from 8M to 3.3M.

Changes:

  • Added a depth parameter to the GitHandler.Clone interface and all implementations
  • Added Depth *int field to all SCM plugin specs (GitHub, GitLab, Gitea, Bitbucket, Stash, and generic Git)
  • Updated the gittag resource to explicitly set depth=1 when cloning repositories
  • Updated all test calls to pass nil for the new depth parameter

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
pkg/plugins/utils/gitgeneric/main.go Updates GitHandler interface and Clone implementation to accept depth parameter
pkg/plugins/scms/github/main.go Adds Depth field to GitHub SCM spec with documentation
pkg/plugins/scms/github/scm.go Passes Depth parameter to Clone call
pkg/plugins/scms/gitlab/main.go Adds Depth field to GitLab SCM spec with documentation
pkg/plugins/scms/gitlab/scm.go Passes Depth parameter to Clone call
pkg/plugins/scms/gitea/main.go Adds Depth field to Gitea SCM spec with documentation
pkg/plugins/scms/gitea/scm.go Passes Depth parameter to Clone call
pkg/plugins/scms/bitbucket/main.go Adds Depth field to Bitbucket SCM spec with documentation
pkg/plugins/scms/bitbucket/scm.go Passes Depth parameter to Clone call
pkg/plugins/scms/stash/main.go Adds Depth field to Stash SCM spec with documentation
pkg/plugins/scms/stash/scm.go Passes Depth parameter to Clone call
pkg/plugins/scms/git/main.go Adds Depth field to generic Git SCM spec with documentation
pkg/plugins/scms/git/scm.go Passes Depth parameter to Clone call
pkg/plugins/resources/gittag/main.go Sets depth=1 for gittag resource clones
pkg/plugins/utils/gitgeneric/main_test.go Updates test calls to pass nil for depth parameter
pkg/plugins/utils/gitgeneric/branch_test.go Updates test call to pass nil for depth parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@olblak olblak enabled auto-merge (squash) February 11, 2026 05:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@olblak olblak merged commit ae29073 into updatecli:main Feb 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scm-bitbucket All things related to the bitbucket integration scm-git SCM of kind "Git" scm-github SCM of type GiHhub scm-gitlab scm-gittea scm-stash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant