Skip to content

Commit 1da4767

Browse files
committed
move GH requester to SDK
Signed-off-by: Jorge Turrado <[email protected]>
1 parent 265f147 commit 1da4767

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/oidcadapters/githubactions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"net/url"
1010
)
1111

12-
func RequestGHOIDCToken(oidc_request_url, oidc_request_token string) OIDCTokenFunc {
12+
func RequestGHOIDCToken(oidcRequestUrl, oidcRequestToken string) OIDCTokenFunc {
1313
return func(ctx context.Context) (string, error) {
14-
req, err := http.NewRequestWithContext(ctx, http.MethodGet, oidc_request_url, http.NoBody)
14+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, oidcRequestUrl, http.NoBody)
1515
if err != nil {
1616
return "", fmt.Errorf("githubAssertion: failed to build request: %w", err)
1717
}
@@ -27,7 +27,7 @@ func RequestGHOIDCToken(oidc_request_url, oidc_request_token string) OIDCTokenFu
2727
}
2828

2929
req.Header.Set("Accept", "application/json")
30-
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", oidc_request_token))
30+
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", oidcRequestToken))
3131
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
3232

3333
resp, err := http.DefaultClient.Do(req)

0 commit comments

Comments
 (0)