Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gitlab private vcs #1632

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ee/backend/controllers/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ func handlePullRequestEvent(gitlabProvider utils.GitlabProvider, payload *gitlab

_, config, projectsGraph, err := utils.GetDiggerConfigForBranch(gitlabProvider, projectId, repoFullName, repoOwner, repoName, cloneURL, branch, prNumber, discussionId)
if err != nil {
utils.InitCommentReporter(glService, prNumber, fmt.Sprintf(":x: Could not load digger config, error: %v", err))
log.Printf("getDiggerConfigForPR error: %v", err)
utils.InitCommentReporter(glService, prNumber, fmt.Sprintf(":x: Could not load digger config, error: %v", err))
return fmt.Errorf("error getting digger config")
}

Expand Down Expand Up @@ -338,8 +338,8 @@ func handleIssueCommentEvent(gitlabProvider utils.GitlabProvider, payload *gitla

diggerYmlStr, config, projectsGraph, err := utils.GetDiggerConfigForBranch(gitlabProvider, projectId, repoFullName, repoOwner, repoName, cloneURL, branch, issueNumber, discussionId)
if err != nil {
utils.InitCommentReporter(glService, issueNumber, fmt.Sprintf(":x: Could not load digger config, error: %v", err))
log.Printf("getDiggerConfigForPR error: %v", err)
utils.InitCommentReporter(glService, issueNumber, fmt.Sprintf(":x: Could not load digger config, error: %v", err))
return fmt.Errorf("error getting digger config")
}

Expand Down
2 changes: 1 addition & 1 deletion libs/ci/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func ParseGitLabContext() (*GitLabContext, error) {
func NewGitLabService(token string, gitLabContext *GitLabContext, gitlabBaseUrl string) (*GitLabService, error) {
var client *go_gitlab.Client
var err error
if gitlabBaseUrl == "" {
if gitlabBaseUrl != "" {
client, err = go_gitlab.NewClient(token, go_gitlab.WithBaseURL(gitlabBaseUrl))
} else {
client, err = go_gitlab.NewClient(token)
Expand Down
Loading