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: removing mr.Headpipeline.Source log when mr.HeadPipeline is missing #3996

Merged
merged 2 commits into from
Dec 7, 2023
Merged
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
8 changes: 4 additions & 4 deletions server/events/vcs/gitlab_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ func (g *GitlabClient) UpdateStatus(repo models.Repo, pull models.PullRequest, s
break
}
if i != retries {
g.logger.Debug("Head pipeline not found for merge request %d, source '%s'. Retrying in %s",
pull.Num, mr.HeadPipeline.Source, delay)
g.logger.Debug("Head pipeline not found for merge request %d. Retrying in %s",
Copy link
Member

Choose a reason for hiding this comment

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

Is there another var that contains the source repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://docs.gitlab.com/ee/api/merge_requests.html#response
from the merge request API this is just the type of event that triggered the pipeline which doesn't seem important to log when there is no pipeline yet

pull.Num, delay)
time.Sleep(delay)
} else {
g.logger.Debug("Head pipeline not found for merge request %d, source '%s'.",
pull.Num, mr.HeadPipeline.Source)
g.logger.Debug("Head pipeline not found for merge request %d.",
pull.Num)
}
}

Expand Down