diff --git a/server/upstream/helper.go b/server/upstream/helper.go index b6dbcd9..fecb2bd 100644 --- a/server/upstream/helper.go +++ b/server/upstream/helper.go @@ -19,17 +19,19 @@ func GetBranchTimestamp(giteaClient *gitea.Client, owner, repo, branch string) * // Get default branch defaultBranch, err := giteaClient.GiteaGetRepoDefaultBranch(owner, repo) if err != nil { - log.Error().Err(err).Msg("GiteaGetRepoDefaultBranch") + log.Err(err).Msg("Could't fetch default branch from repository") return nil } + log.Debug().Msgf("found default branch: %s", defaultBranch) branch = defaultBranch } timestamp, err := giteaClient.GiteaGetRepoBranchTimestamp(owner, repo, branch) if err != nil { - log.Error().Err(err).Msg("GiteaGetRepoBranchTimestamp") + log.Err(err).Msg("Could not get latest commit's timestamp from branch") return nil } + log.Debug().Msgf("Succesfully fetched latest commit's timestamp from branch: %#v", timestamp) return timestamp }