@@ -254,24 +254,24 @@ in your local browser, enter the code, and authorize. Press ENTER after authori
254254 (format " Your one-time code %s is copied. \
255255Press ENTER to open GitHub in your browser. \
256256If your browser does not open automatically, browse to %s . "
257- user_code verification_uri))
258- (browse-url verification_uri)
259- (read-from-minibuffer " Press ENTER after authorizing." ))
260- (thread-last
261- (plist-get
262- (gptel--url-retrieve
263- " https://github.com/login/oauth/access_token"
264- :method 'post
265- :headers gptel--gh-auth-common-headers
266- :data `( :client_id , gptel--gh-client-id
267- :device_code , device_code
268- :grant_type " urn:ietf:params:oauth:grant-type:device_code" ))
269- :access_token )
270- (gptel--gh-save-github-token))
271- (let ((github-token (gptel--gh-load-github-token)))
272- (if (and github-token (not (string-empty-p github-token)))
273- (message " Successfully logged in to GitHub Copilot " )
274- (user-error " Error: You might not have access to GitHub Copilot Chat!" ))))))
257+ user_code verification_uri))
258+ (browse-url verification_uri)
259+ (read-from-minibuffer " Press ENTER after authorizing." ))
260+ (thread-last
261+ (plist-get
262+ (gptel--url-retrieve
263+ " https://github.com/login/oauth/access_token"
264+ :method 'post
265+ :headers gptel--gh-auth-common-headers
266+ :data `( :client_id , gptel--gh-client-id
267+ :device_code , device_code
268+ :grant_type " urn:ietf:params:oauth:grant-type:device_code" ))
269+ :access_token )
270+ (gptel--gh-save-github-token))
271+ (let ((github-token (gptel--gh-load-github-token)))
272+ (if (and github-token (not (string-empty-p github-token)))
273+ (message " Successfully logged in to GitHub Copilot " )
274+ (user-error " Error: You might not have access to GitHub Copilot Chat!" ))))))
275275
276276(defun gptel--gh-renew-token ()
277277 " Renew session token."
0 commit comments