|
@@ -3,7 +3,6 @@ const AccessControl = require("../../lib/AccessControl")
|
|
|
const { BaseStdResponse } = require("../../BaseStdResponse")
|
|
|
const db = require("../../plugin/DataBase/db")
|
|
|
const simpleGit = require('simple-git')
|
|
|
-const crypto = require("crypto")
|
|
|
|
|
|
class GitContributors extends API {
|
|
|
constructor() {
|
|
@@ -13,12 +12,6 @@ class GitContributors extends API {
|
|
|
this.setPath("/Repos/Contributors")
|
|
|
}
|
|
|
|
|
|
- getGravatarUrl(email) {
|
|
|
- if (!email) return null
|
|
|
- const hash = crypto.createHash("md5").update(email.trim().toLowerCase()).digest("hex")
|
|
|
- return `https://gravatar.loli.net/avatar/${hash}?s=512&r=pg`
|
|
|
- }
|
|
|
-
|
|
|
async analyzeGitContributors(repoPath) {
|
|
|
try {
|
|
|
const git = simpleGit()
|
|
@@ -46,7 +39,6 @@ class GitContributors extends API {
|
|
|
contributors[currentAuthor] = {
|
|
|
name,
|
|
|
email,
|
|
|
- avatar: this.getGravatarUrl(email),
|
|
|
commits: 0,
|
|
|
linesAdded: 0,
|
|
|
linesDeleted: 0,
|