commit 4efbe3fd7f7ec549b02091341b30012442575e87
parent 1d8e91a786dea2b817eaea6ba8bc156f9a344f06
Author: Russ Cox <rsc@golang.org>
Date: Sun, 19 May 2024 10:10:08 -0400
issuedb: fix github auth
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/issuedb/main.go b/issuedb/main.go
@@ -227,12 +227,11 @@ func syncIssues(proj *ProjectSync) {
func downloadByDate(proj *ProjectSync, api string, since *string, sinceName string) {
values := url.Values{
- "client_id": {auth.ClientID},
- "client_secret": {auth.ClientSecret},
- "sort": {"updated"},
- "direction": {"asc"},
- "page": {"1"},
- "per_page": {"100"},
+ "client_id": {auth.ClientID},
+ "sort": {"updated"},
+ "direction": {"asc"},
+ "page": {"1"},
+ "per_page": {"100"},
}
if api == "/issues" {
values.Set("state", "all")
@@ -434,6 +433,7 @@ func downloadPages(url, etag string, do func(*http.Response, []json.RawMessage)
if etag != "" {
req.Header.Set("If-None-Match", etag)
}
+ req.SetBasicAuth(auth.ClientID, auth.ClientSecret)
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err