Skip to content

Commit

Permalink
style: 完善注释及风格generate-contributors.js (#2)
Browse files Browse the repository at this point in the history
style: generate-contributors.js完善注释及风格
  • Loading branch information
oldme-git authored Oct 29, 2024
1 parent 0f7bf0c commit eda2eb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate-contributors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require("fs")
const sharp = require('sharp');
const sharp = require('sharp')

// github api url
const githubUrl = `https://api.github.com/repos/gogf/gf/contributors`
Expand All @@ -16,7 +16,6 @@ const xSpace = 4, ySpace = 4
// 每一行的头像数量
const row = 20

// 使用示例
getContributors().then(contributors => {
genSvg(contributors).then(r => {
console.log(`${svgPath} 生成成功, 一共 ${contributors.length} 个贡献者`)
Expand All @@ -25,7 +24,7 @@ getContributors().then(contributors => {
console.error(error)
})


// getContributors 获取所有的贡献者
async function getContributors() {
const contributors = []
let page = 1
Expand All @@ -52,6 +51,7 @@ async function getContributors() {
return contributors
}

// genSvg 生成 svg 文件
async function genSvg(data) {
let contributorsArr = chunkArray(data, row)

Expand Down

0 comments on commit eda2eb6

Please sign in to comment.