Hide build logs older than 30 days (#4436)

This commit is contained in:
Ammar Bandukwala
2022-10-09 20:01:18 +00:00
committed by GitHub
parent dd5173b45c
commit eefc26c108
12 changed files with 113 additions and 66 deletions
+5 -4
View File
@@ -44,12 +44,13 @@ type Client struct {
type RequestOption func(*http.Request)
func WithQueryParams(params map[string]string) RequestOption {
func WithQueryParam(key, value string) RequestOption {
return func(r *http.Request) {
q := r.URL.Query()
for k, v := range params {
q.Add(k, v)
if value == "" {
return
}
q := r.URL.Query()
q.Add(key, value)
r.URL.RawQuery = q.Encode()
}
}