mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
add debugging from 091e6c8ed9
back
This commit is contained in:
parent
bcb7d773d1
commit
9626d3a8a0
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue