jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-48294] GitHubSCMBuilder does not respect clone depth parameter in pull requests

Open
#1,153 0 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

Trying to build a pull request on my github repo and facing with build failure due to timeout.

I've set shallow clone depth option to 1, but the log shows that "--depth" parameter is missing. Seems like that option is respected in branches only.

So, git is trying to do a full repo clone, which is currently 600 MB. Able to workaround that by setting a 1 hour timeout, But that's absolutely insane: just to assure that a pull request is fine, I have to wait for an hour to start the check script.

Probably, related to -JENKINS-45771-, maybe a separate shallow clone options would be more preferrable rather than ignoring it for some weird reason.

 

---
Originally reported by segazero, imported from: GitHubSCMBuilder does not respect clone depth parameter in pull requests


  • assignee: lanwen
  • status: Open
  • priority: Major
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-02

Raw content of original issue

Trying to build a pull request on my github repo and facing with build failure due to timeout.

I've set shallow clone depth option to 1, but the log shows that "--depth" parameter is missing. Seems like that option is respected in branches only.

So, git is trying to do a full repo clone, which is currently 600 MB. Able to workaround that by setting a 1 hour timeout, But that's absolutely insane: just to assure that a pull request is fine, I have to wait for an hour to start the check script.

Probably, related to -JENKINS-45771-, maybe a separate shallow clone options would be more preferrable rather than ignoring it for some weird reason.

 

  • environment: macOS 10.13.1, jenkins 2.92 (installed with brew), github-pullrequest 0.1.0-rc27, github 1.28.1, git 3.6.4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.