chore: update docs; final read

metrics-fix
Jef Roosens 2023-01-04 14:37:41 +01:00
parent 39a026fdb3
commit 398e2bd9eb
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 5 additions and 1 deletions

View File

@ -55,6 +55,8 @@ Parameter | Description
limit | Maximum amount of results to return. limit | Maximum amount of results to return.
offset | Offset of results. offset | Offset of results.
repo | Limit results to targets that publish to the given repo. repo | Limit results to targets that publish to the given repo.
query | Only return targets that have this substring in their URL, path or branch.
arch | Only return targets that publish to this arch.
## Get specific target ## Get specific target

View File

@ -63,6 +63,7 @@ fn (mut ti TargetsIterator) advance_window() {
|| it.path.contains(ti.filter.query) || it.branch.contains(ti.filter.query)) || it.path.contains(ti.filter.query) || it.branch.contains(ti.filter.query))
} }
// We break out of the loop once we found a non-empty window
if ti.window.len > 0 { if ti.window.len > 0 {
break break
} }
@ -75,7 +76,8 @@ pub fn (mut ti TargetsIterator) next() ?Target {
return none return none
} }
// The first call to `next` will cause the sliding window to move to where the requested offset starts // The first call to `next` will cause the sliding window to move to where
// the requested offset starts
if !ti.started { if !ti.started {
ti.advance_window() ti.advance_window()