Skip to content

Commit a277525

Browse files
committed
allow leaving token as nil
1 parent a6ed157 commit a277525

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/algora/integrations/github/client.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ defmodule Algora.Github.Client do
7979
"api.github.com",
8080
method,
8181
path,
82-
[{"accept", "application/vnd.github.v3+json"}, {"Authorization", "Bearer #{access_token}"}],
82+
[{"accept", "application/vnd.github.v3+json"}] ++
83+
if(access_token, do: [{"Authorization", "Bearer #{access_token}"}], else: []),
8384
body,
8485
opts
8586
)

0 commit comments

Comments
 (0)