Showing 1 of 3 files from the diff.
Other files ignored by Codecov
package.json has changed.
yarn.lock has changed.

@@ -1,4 +1,4 @@
Loading
1 -
import axios from "axios";
1 +
import got from "got";
2 2
import express, { Request } from "express";
3 3
import { URLSearchParams } from "url";
4 4
import { Environment, Logger, Webview } from "~/services";
@@ -16,7 +16,7 @@
Loading
16 16
			const server = app.listen(port);
17 17
18 18
			app.get("/implicit", async (request) => {
19 -
				const token = request.params.token;
19 +
				const token = request.query.token as string;
20 20
				const user = await getUser(token, provider);
21 21
22 22
				if (!user) return;
@@ -72,10 +72,9 @@
Loading
72 72
				bitbucket: `Bearer ${token}`,
73 73
			};
74 74
75 -
			const { data } = await axios(urls[provider], {
76 -
				method: "GET",
75 +
			const data = await got(urls[provider], {
77 76
				headers: { Authorization: authHeader[provider] },
78 -
			});
77 +
			}).json<any>();
79 78
80 79
			switch (provider) {
81 80
				case "github":
@@ -93,17 +92,15 @@
Loading
93 92
94 93
	const getToken = async (code: string) => {
95 94
		try {
96 -
			const { data } = await axios(
97 -
				`https://github.com/login/oauth/access_token`,
98 -
				{
99 -
					method: "POST",
100 -
					data: {
95 +
			const data = await got
96 +
				.post(`https://github.com/login/oauth/access_token`, {
97 +
					json: {
101 98
						code,
102 99
						client_id: Environment.oauthClientIds.github,
103 100
						client_secret: "3ac123310971a75f0a26e979ce0030467fc32682",
104 101
					},
105 -
				},
106 -
			);
102 +
				})
103 +
				.text();
107 104
108 105
			return new URLSearchParams(data).get("access_token");
109 106
		} catch (error) {
@@ -114,7 +111,7 @@
Loading
114 111
	const handleRequest = async (request: Request, provider: Provider) => {
115 112
		if (provider !== "github") return;
116 113
117 -
		const token = await getToken(request.params.code);
114 +
		const token = await getToken(request.query.code as string);
118 115
119 116
		if (!token) return;
120 117
Files Coverage
src 70.67%
Project Totals (32 files) 70.67%
1
coverage:
2
  range: 65..100
3

4
  status:
5
    project: off
6
    patch: off
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading