chore: code formatting

This commit is contained in:
github-actions[bot]
2023-01-17 01:49:45 +00:00
parent e015fac116
commit 26d74b64f5
3 changed files with 7 additions and 8 deletions

View File

@@ -12,9 +12,8 @@ export default async function({login, data, imports, rest, q, account}, {enabled
//Context
let context = {mode: "user"}
if (data.account) {
if (data.account)
context = {...context, mode: "organization"}
}
else if (q.repo) {
console.debug(`metrics/compute/${login}/plugins > people > switched to repository mode`)
context = {...context, mode: "repository"}
@@ -38,7 +37,7 @@ export default async function({login, data, imports, rest, q, account}, {enabled
return
//Compute changes
repos[handle] = {added: 0, deleted: 0, changed: 0}
const contributors = stats.filter(({author}) => (context.mode === "repository")||(context.mode === "organization") ? true : author?.login?.toLocaleLowerCase() === login.toLocaleLowerCase())
const contributors = stats.filter(({author}) => (context.mode === "repository") || (context.mode === "organization") ? true : author?.login?.toLocaleLowerCase() === login.toLocaleLowerCase())
for (const contributor of contributors) {
let added = 0, changed = 0, deleted = 0
contributor.weeks.forEach(({a = 0, d = 0, c = 0, w}) => {

View File

@@ -2,7 +2,7 @@
import { Client as Gmap } from "@googlemaps/google-maps-services-js"
import color from "color"
import * as d3 from "d3"
import {D3node} from "../../../app/metrics/utils.mjs"
import { D3node } from "../../../app/metrics/utils.mjs"
/**
* Worldmap