chore: bump got from 9.x to 10.x (#3875)

This commit is contained in:
DIYgod
2020-02-04 01:09:14 +08:00
committed by GitHub
parent 4be7802b27
commit 77d55262ff
99 changed files with 483 additions and 445 deletions

View File

@@ -1,5 +1,6 @@
const got = require('@/utils/got');
const config = require('@/config').value;
const queryString = require('query-string');
module.exports = async (ctx) => {
const user = ctx.params.user;
@@ -10,11 +11,11 @@ module.exports = async (ctx) => {
const fileUrl = `https://github.com/${user}/${repo}/commits/${branch}/${filepath}`;
const res = await got.get(`https://api.github.com/repos/${user}/${repo}/commits`, {
params: {
searchParams: queryString.stringify({
sha: branch,
path: filepath,
access_token: config.github && config.github.access_token,
},
}),
});
const list = res.data;
const count = [];