This repository was archived by the owner on Oct 24, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/main/kotlin/dev/koding/copilot/auth Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 3838 - name : Upload Artifacts
3939 uses : actions/upload-artifact@v2
4040 with :
41- name : Artifacts.zip
41+ name : Artifacts
4242 path : build/distributions
Original file line number Diff line number Diff line change 33package dev.koding.copilot.auth
44
55import com.google.gson.annotations.SerializedName
6+ import com.intellij.ide.BrowserUtil
67import dev.koding.copilot.config.settings
78import dev.koding.copilot.httpClient
89import dev.koding.copilot.util.Notifications
910import io.ktor.client.request.*
1011import io.ktor.http.*
1112import kotlinx.coroutines.GlobalScope
1213import kotlinx.coroutines.launch
13- import java.awt.Desktop
14- import java.net.URI
1514import javax.swing.JOptionPane
1615
1716const val authenticateUrl = " https://vscode-auth.github.com/authorize/" +
@@ -48,7 +47,7 @@ private suspend fun getAuthToken(url: String): CopilotTokenResponse {
4847}
4948
5049fun handleLogin (handler : (String ) -> Unit = { Notifications .send("Login successful") }) {
51- Desktop .getDesktop(). browse(URI .create( authenticateUrl) )
50+ BrowserUtil . browse(authenticateUrl)
5251 val url = JOptionPane .showInputDialog(" Enter the callback URL" )
5352
5453 // TODO: Change from global scope
You can’t perform that action at this time.
0 commit comments