Skip to content

Commit 4d22626

Browse files
authored
common.rb - update REST headers (#10)
1 parent 779cfad commit 4d22626

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ def gh_upload_http
7474

7575
def set_v3_common_headers(req, connection: nil)
7676
req['User-Agent'] = GH_NAME
77-
req['Authorization'] = "token #{TOKEN}"
77+
req['Authorization'] = "Bearer #{TOKEN}"
7878
req['Accept'] = 'application/vnd.github+json' # old 'application/vnd.github.v3+json'
79+
req['X-GitHub-Api-Version'] = '2022-11-28'
7980
req['Connection'] = 'close' if connection == 'close'
8081
end
8182

0 commit comments

Comments
 (0)