mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-09-30 21:42:05 +00:00
feat: make logging interval configurable (#511)
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/511 Reviewed-by: Andreas Shimokawa <ashimokawa@noreply.codeberg.org> Co-authored-by: crapStone <me@crapstone.dev> Co-committed-by: crapStone <me@crapstone.dev>
This commit is contained in:
parent
30bc87089c
commit
2e271575c9
8 changed files with 31 additions and 8 deletions
|
@ -45,7 +45,7 @@ func GetTargetFromDNS(domain, mainDomainSuffix, firstDefaultBranch string) (targ
|
|||
_ = lookupCache.Add(domain, cname)
|
||||
}
|
||||
if cname == "" {
|
||||
return
|
||||
return targetOwner, targetRepo, targetBranch
|
||||
}
|
||||
cnameParts := strings.Split(strings.TrimSuffix(cname, mainDomainSuffix), ".")
|
||||
targetOwner = cnameParts[len(cnameParts)-1]
|
||||
|
@ -62,5 +62,5 @@ func GetTargetFromDNS(domain, mainDomainSuffix, firstDefaultBranch string) (targ
|
|||
targetBranch = firstDefaultBranch
|
||||
}
|
||||
// if targetBranch is still empty, the caller must find the default branch
|
||||
return
|
||||
return targetOwner, targetRepo, targetBranch
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue