chore: code formatting

This commit is contained in:
github-actions[bot]
2022-01-28 01:53:23 +00:00
parent 3945af02d1
commit 8890aea598
5 changed files with 38 additions and 32 deletions

View File

@@ -101,7 +101,7 @@ export default async function({sandbox = false} = {}) {
const {limit} = await graphql("{ limit:rateLimit {limit remaining reset:resetAt used} }")
Object.assign(requests, {
rest:(await rest.rateLimit.get()).data.rate,
graphql:{...limit, reset:new Date(limit.reset).getTime()}
graphql:{...limit, reset:new Date(limit.reset).getTime()},
})
}
catch {

View File

@@ -96,7 +96,8 @@
try {
const { data: requests } = await axios.get("/.requests")
this.requests = requests
} catch {}
}
catch {}
}
},
},
@@ -150,7 +151,7 @@
rlreset() {
const reset = new Date(Math.max(this.requests.graphql.reset, this.requests.rest.reset))
return `${reset.getHours()}:${reset.getMinutes()}`
}
},
},
//Data initialization
data: {

View File

@@ -107,7 +107,7 @@
action: {
link: "https://github.com/lowlighter/metrics/blob/master/.github/readme/partials/documentation/setup/action.md",
name: "Setup using GitHub Action on a profile repository",
}
},
},
plugins: {
base: {},
@@ -269,7 +269,7 @@
rlreset() {
const reset = new Date(Math.max(this.requests.graphql.reset, this.requests.rest.reset))
return `${reset.getHours()}:${reset.getMinutes()}`
}
},
},
//Methods
methods: {
@@ -321,7 +321,8 @@
try {
const { data: requests } = await axios.get("/.requests")
this.requests = requests
} catch {}
}
catch {}
}
},
},

View File

@@ -247,21 +247,25 @@
? ({
notable: {
contributions: new Array(2 + faker.datatype.number(2)).fill(null).map(_ => ({
get name() { return options["notable.repositories"] ? this.handle : this.handle.split("/")[0] },
get name() {
return options["notable.repositories"] ? this.handle : this.handle.split("/")[0]
},
handle: `${faker.lorem.slug()}/${faker.lorem.slug()}`,
avatar: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOcOnfpfwAGfgLYttYINwAAAABJRU5ErkJggg==",
organization: faker.datatype.boolean(),
stars: faker.datatype.number(1000),
aggregated: faker.datatype.number(100),
history: faker.datatype.number(1000),
...(options["notable.indepth"] ? {
...(options["notable.indepth"]
? {
user: {
commits: faker.datatype.number(100),
percentage: faker.datatype.float({ max: 1 }),
maintainer: false,
stars: faker.datatype.number(100),
},
}
} : null)
: null),
})),
},
})
@@ -605,7 +609,7 @@
fortune: faker.random.arrayElement([
{ chance: .06, color: "#43FD3B", text: "Good news will come to you by mail" },
{ chance: .06, color: "#00CBB0", text: "キタ━━━━━━(゚∀゚)━━━━━━ !!!!" },
{chance: 0.03, color: "#FD4D32", text: "Excellent Luck"}
{ chance: 0.03, color: "#FD4D32", text: "Excellent Luck" },
]),
})
: null),