From fdd2707a7f724b4a1fd7abfee3133cd99b88fe36 Mon Sep 17 00:00:00 2001 From: visiky <736929286@qq.com> Date: Sun, 13 Jun 2021 08:30:12 +0800 Subject: [PATCH 1/3] chore: init contributors --- .all-contributorsrc | 331 +++++++++++++++++++++++++++++++++++ README.md | 60 +++++++ README.zh-CN.md | 58 ++++++ package.json | 5 +- scripts/init-contributors.js | 34 ++++ 5 files changed, 487 insertions(+), 1 deletion(-) create mode 100644 .all-contributorsrc create mode 100644 scripts/init-contributors.js diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 0000000000..36401ec38d --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,331 @@ +{ + "projectName": "g2plot", + "projectOwner": "antvis", + "repoType": "github", + "repoHost": "https://github.com", + "files": [ + "README.md", + "README.zh-CN.md" + ], + "imageSize": 32, + "commit": false, + "commitConvention": "none", + "contributors": [ + { + "login": "visiky", + "name": "Visiky", + "avatar_url": "https://avatars.githubusercontent.com/u/15646325?v=4", + "profile": "https://github.com/visiky", + "contributions": [ + "code" + ] + }, + { + "login": "hustcc", + "name": "hustcc", + "avatar_url": "https://avatars.githubusercontent.com/u/7856674?v=4", + "profile": "https://hust.cc/", + "contributions": [ + "code" + ] + }, + { + "login": "lxfu1", + "name": "Joel Alan", + "avatar_url": "https://avatars.githubusercontent.com/u/31396322?v=4", + "profile": "https://github.com/lxfu1", + "contributions": [ + "code" + ] + }, + { + "login": "liuzhenying", + "name": "刘珍莹", + "avatar_url": "https://avatars.githubusercontent.com/u/11748654?v=4", + "profile": "https://github.com/liuzhenying", + "contributions": [ + "code" + ] + }, + { + "login": "zqlu", + "name": "zqlu", + "avatar_url": "https://avatars.githubusercontent.com/u/1142242?v=4", + "profile": "https://github.com/zqlu", + "contributions": [ + "code" + ] + }, + { + "login": "arcsin1", + "name": "arcsin1", + "avatar_url": "https://avatars.githubusercontent.com/u/13724222?v=4", + "profile": "https://github.com/arcsin1", + "contributions": [ + "code" + ] + }, + { + "login": "zhangzhonghe", + "name": "被雨水过滤的空气", + "avatar_url": "https://avatars.githubusercontent.com/u/38434641?v=4", + "profile": "https://github.com/zhangzhonghe", + "contributions": [ + "code" + ] + }, + { + "login": "yp0413150120", + "name": "banli", + "avatar_url": "https://avatars.githubusercontent.com/u/24318174?v=4", + "profile": "https://github.com/yp0413150120", + "contributions": [ + "code" + ] + }, + { + "login": "BBSQQ", + "name": "xi li", + "avatar_url": "https://avatars.githubusercontent.com/u/35586469?v=4", + "profile": "https://github.com/BBSQQ", + "contributions": [ + "code" + ] + }, + { + "login": "DarrenPei", + "name": "DarrenPei", + "avatar_url": "https://avatars.githubusercontent.com/u/42288791?v=4", + "profile": "https://blog.csdn.net/weixin_42628594", + "contributions": [ + "code" + ] + }, + { + "login": "pearmini", + "name": "MiniPear", + "avatar_url": "https://avatars.githubusercontent.com/u/49330279?v=4", + "profile": "https://github.com/pearmini", + "contributions": [ + "code" + ] + }, + { + "login": "connono", + "name": "connono", + "avatar_url": "https://avatars.githubusercontent.com/u/36756846?v=4", + "profile": "https://github.com/connono", + "contributions": [ + "code" + ] + }, + { + "login": "yujs", + "name": "于向前", + "avatar_url": "https://avatars.githubusercontent.com/u/16610138?v=4", + "profile": "https://github.com/yujs", + "contributions": [ + "code" + ] + }, + { + "login": "afc163", + "name": "afc163", + "avatar_url": "https://avatars.githubusercontent.com/u/507615?v=4", + "profile": "https://twitter.com/afc163", + "contributions": [ + "code" + ] + }, + { + "login": "mjul", + "name": "Martin Jul", + "avatar_url": "https://avatars.githubusercontent.com/u/142868?v=4", + "profile": "http://www.mjul.com/", + "contributions": [ + "code" + ] + }, + { + "login": "jinhuiWong", + "name": "jhwong", + "avatar_url": "https://avatars.githubusercontent.com/u/23117130?v=4", + "profile": "https://github.com/jinhuiWong", + "contributions": [ + "code" + ] + }, + { + "login": "kagawagao", + "name": "Jingsong Gao", + "avatar_url": "https://avatars.githubusercontent.com/u/6930280?v=4", + "profile": "https://kingsongao.com/", + "contributions": [ + "code" + ] + }, + { + "login": "MrSmallLiu", + "name": "Mr小刘", + "avatar_url": "https://avatars.githubusercontent.com/u/26038018?v=4", + "profile": "https://github.com/MrSmallLiu", + "contributions": [ + "code" + ] + }, + { + "login": "ntscshen", + "name": "ntscshen", + "avatar_url": "https://avatars.githubusercontent.com/u/21041458?v=4", + "profile": "https://github.com/ntscshen", + "contributions": [ + "code" + ] + }, + { + "login": "guonanci", + "name": "yiminanci", + "avatar_url": "https://avatars.githubusercontent.com/u/12762626?v=4", + "profile": "https://juejin.cn/user/3491704660305111", + "contributions": [ + "code" + ] + }, + { + "login": "ai-qing-hai", + "name": "ai-qing-hai", + "avatar_url": "https://avatars.githubusercontent.com/u/65594180?v=4", + "profile": "https://github.com/ai-qing-hai", + "contributions": [ + "code" + ] + }, + { + "login": "xrkffgg", + "name": "xrkffgg", + "avatar_url": "https://avatars.githubusercontent.com/u/29775873?v=4", + "profile": "https://github.com/xrkffgg", + "contributions": [ + "code" + ] + }, + { + "login": "DawnLck", + "name": "Dawnlck", + "avatar_url": "https://avatars.githubusercontent.com/u/12195307?v=4", + "profile": "https://github.com/DawnLck", + "contributions": [ + "code" + ] + }, + { + "login": "CarisL", + "name": "Karis", + "avatar_url": "https://avatars.githubusercontent.com/u/13416424?v=4", + "profile": "https://github.com/CarisL", + "contributions": [ + "code" + ] + }, + { + "login": "mayneyao", + "name": "Mayne", + "avatar_url": "https://avatars.githubusercontent.com/u/6588202?v=4", + "profile": "https://gine.me/", + "contributions": [ + "code" + ] + }, + { + "login": "Plortinus", + "name": "Plortinus", + "avatar_url": "https://avatars.githubusercontent.com/u/20693993?v=4", + "profile": "https://github.com/Plortinus", + "contributions": [ + "code" + ] + }, + { + "login": "csjkevin", + "name": "Shanjie Chen", + "avatar_url": "https://avatars.githubusercontent.com/u/17211870?v=4", + "profile": "https://github.com/csjkevin", + "contributions": [ + "code" + ] + }, + { + "login": "yanglbme", + "name": "Yang Libin", + "avatar_url": "https://avatars.githubusercontent.com/u/21008209?v=4", + "profile": "https://doocs.github.io/", + "contributions": [ + "code" + ] + }, + { + "login": "beewolf233", + "name": "beewolf233", + "avatar_url": "https://avatars.githubusercontent.com/u/24711525?v=4", + "profile": "https://github.com/beewolf233", + "contributions": [ + "code" + ] + }, + { + "login": "lqzhgood", + "name": "lqzhgood", + "avatar_url": "https://avatars.githubusercontent.com/u/9134671?v=4", + "profile": "https://github.com/lqzhgood", + "contributions": [ + "code" + ] + }, + { + "login": "neoddish", + "name": "neoddish", + "avatar_url": "https://avatars.githubusercontent.com/u/6898060?v=4", + "profile": "https://jiazhe.wang/", + "contributions": [ + "code" + ] + }, + { + "login": "stack-stark", + "name": "stack-stark", + "avatar_url": "https://avatars.githubusercontent.com/u/46991054?v=4", + "profile": "https://github.com/stack-stark", + "contributions": [ + "code" + ] + }, + { + "login": "NewByVector", + "name": "vector", + "avatar_url": "https://avatars.githubusercontent.com/u/20186737?v=4", + "profile": "https://github.com/NewByVector", + "contributions": [ + "code" + ] + }, + { + "login": "xingwanying", + "name": "嘤嘤嘤", + "avatar_url": "https://avatars.githubusercontent.com/u/10885578?v=4", + "profile": "http://www.wanyingxing.vip/", + "contributions": [ + "code" + ] + }, + { + "login": "juzhiyuan", + "name": "琚致远", + "avatar_url": "https://avatars.githubusercontent.com/u/2106987?v=4", + "profile": "https://wineso.me/", + "contributions": [ + "code" + ] + } + ], + "contributorsPerLine": 7 +} diff --git a/README.md b/README.md index 1ff77782bd..58abbf564c 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,66 @@ Your contributions are always welcome! Please Do have a look at the [issues](htt To become a contributor, please follow our [contributing guide](https://github.com/antvis/g2plot/blob/master/CONTRIBUTING.md). +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Visiky

💻

hustcc

💻

Joel Alan

💻

刘珍莹

💻

zqlu

💻

arcsin1

💻

被雨水过滤的空气

💻

banli

💻

xi li

💻

DarrenPei

💻

MiniPear

💻

connono

💻

于向前

💻

afc163

💻

Martin Jul

💻

jhwong

💻

Jingsong Gao

💻

Mr小刘

💻

ntscshen

💻

yiminanci

💻

ai-qing-hai

💻

xrkffgg

💻

Dawnlck

💻

Karis

💻

Mayne

💻

Plortinus

💻

Shanjie Chen

💻

Yang Libin

💻

beewolf233

💻

lqzhgood

💻

neoddish

💻

stack-stark

💻

vector

💻

嘤嘤嘤

💻

琚致远

💻
+ + + + + + +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! + ## 📧 Contact us 钉钉群组号码: 30233731 diff --git a/README.zh-CN.md b/README.zh-CN.md index 66b8e8f82b..c0679aa77a 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -104,6 +104,64 @@ bar.render(); 提交代码请遵循 [贡献指引](https://github.com/antvis/g2plot/blob/master/CONTRIBUTING.md)。 +感谢下面这些贡献者 ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Visiky

💻

hustcc

💻

Joel Alan

💻

刘珍莹

💻

zqlu

💻

arcsin1

💻

被雨水过滤的空气

💻

banli

💻

xi li

💻

DarrenPei

💻

MiniPear

💻

connono

💻

于向前

💻

afc163

💻

Martin Jul

💻

jhwong

💻

Jingsong Gao

💻

Mr小刘

💻

ntscshen

💻

yiminanci

💻

ai-qing-hai

💻

xrkffgg

💻

Dawnlck

💻

Karis

💻

Mayne

💻

Plortinus

💻

Shanjie Chen

💻

Yang Libin

💻

beewolf233

💻

lqzhgood

💻

neoddish

💻

stack-stark

💻

vector

💻

嘤嘤嘤

💻

琚致远

💻
+ + + + + + ## 📧 联系我们 钉钉群组号码: 30233731 diff --git a/package.json b/package.json index da0f14fd0c..5181fbbcc8 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,9 @@ "ci": "run-s lint coverage build", "changelog": "generate-changelog", "prepublishOnly": "run-s lint test build", - "analyze": "webpack --profile --json > dist/stats.json && webpack-bundle-analyzer ./dist/stats.json" + "analyze": "webpack --profile --json > dist/stats.json && webpack-bundle-analyzer ./dist/stats.json", + "contributors:add": "all-contributors add", + "contributors:check": "all-contributors check" }, "husky": { "hooks": { @@ -74,6 +76,7 @@ "@types/jest": "^25.2.1", "@typescript-eslint/eslint-plugin": "^2.0.0", "@typescript-eslint/parser": "^2.0.0", + "all-contributors-cli": "^6.20.0", "antd": "^4.8.4", "babel-loader": "^8.1.0", "conventional-changelog-cli": "^2.0.34", diff --git a/scripts/init-contributors.js b/scripts/init-contributors.js new file mode 100644 index 0000000000..721d997b33 --- /dev/null +++ b/scripts/init-contributors.js @@ -0,0 +1,34 @@ +const { Octokit } = require('@octokit/rest'); +const shell = require('shelljs'); + +const octokit = new Octokit(); + +async function queryContributors(owner, repo, page = 1) { + let { data: contributors } = await octokit.rest.repos.listContributors({ + owner, + repo, + per_page: 100, + page, + }); + + if (contributors.length >= 100) { + contributors = contributors.concat(await queryContributions(page + 1)); + } + + return contributors; +} + +function exec() { + // 方式1: Get contributors by run `npm run contributors:check` + // 方式2: queryContributors + queryContributors('antvis', 'g2plot').then((contributors) => { + shell.echo('contributors', contributors.length); + contributors + .sort((a, b) => b.contributions - a.contributions) + .forEach((contributor) => { + shell.exec(`tnpm run contributors:add ${contributor.login} code`); + }); + }); +} + +exec(); From 1e178deb5a6f0a9435396b554941f0dc00049352 Mon Sep 17 00:00:00 2001 From: visiky <736929286@qq.com> Date: Sun, 13 Jun 2021 08:30:20 +0800 Subject: [PATCH 2/3] chore: delete contributors-helper.yml --- .github/ISSUE_TEMPLATE.md | 7 ------ .github/workflows/contributor-helper.yml | 29 ------------------------ 2 files changed, 36 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md delete mode 100644 .github/workflows/contributor-helper.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index ba0a7a1b42..0000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ -* **G2Plot Version**: -* **Platform**: -* **Mini Showcase(like screenshots)**: -* **CodePen Link**: - - - diff --git a/.github/workflows/contributor-helper.yml b/.github/workflows/contributor-helper.yml deleted file mode 100644 index 8fa427cba9..0000000000 --- a/.github/workflows/contributor-helper.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Contributor Helper - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - contributor: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - - uses: actions-cool/contributor-helper@v1.2.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - update-files: 'README.md, README.zh-CN.md' - update-places: 'CONTRIBUTING.md)./## 📧 Contact us, CONTRIBUTING.md)。/## 📧 联系我们' - show-total: false - style: 'simple' - - - name: Commit and push if changed - run: |- - git diff - git config --local user.name visiky - git config --local user.email 736929286@qq.com - git pull - git add -A - git commit -m "🤖 Auto update contributors" || exit 0 - git push From 839cbd0ef0315538380f6bf98012695c1cfaaeb3 Mon Sep 17 00:00:00 2001 From: visiky <736929286@qq.com> Date: Sun, 13 Jun 2021 08:33:31 +0800 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E4=B8=8B?= =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E5=B1=95=E7=A4=BA=E5=BD=A2=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .all-contributorsrc | 2 +- README.md | 16 +++++++++------- README.zh-CN.md | 16 +++++++++------- package.json | 3 +-- scripts/init-contributors.js | 5 ++--- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 36401ec38d..5bba6c4bea 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -327,5 +327,5 @@ ] } ], - "contributorsPerLine": 7 + "contributorsPerLine": 6 } diff --git a/README.md b/README.md index 58abbf564c..ab0be8e628 100644 --- a/README.md +++ b/README.md @@ -105,38 +105,40 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
刘珍莹

💻
zqlu

💻
arcsin1

💻 -
被雨水过滤的空气

💻 +
被雨水过滤的空气

💻
banli

💻
xi li

💻
DarrenPei

💻
MiniPear

💻
connono

💻 -
于向前

💻 -
afc163

💻 +
于向前

💻 +
afc163

💻
Martin Jul

💻
jhwong

💻
Jingsong Gao

💻
Mr小刘

💻 + +
ntscshen

💻
yiminanci

💻
ai-qing-hai

💻 - -
xrkffgg

💻
Dawnlck

💻
Karis

💻 + +
Mayne

💻
Plortinus

💻
Shanjie Chen

💻
Yang Libin

💻 - -
beewolf233

💻
lqzhgood

💻 + +
neoddish

💻
stack-stark

💻
vector

💻 diff --git a/README.zh-CN.md b/README.zh-CN.md index c0679aa77a..40b229a4f8 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -117,38 +117,40 @@ bar.render();
刘珍莹

💻
zqlu

💻
arcsin1

💻 -
被雨水过滤的空气

💻 +
被雨水过滤的空气

💻
banli

💻
xi li

💻
DarrenPei

💻
MiniPear

💻
connono

💻 -
于向前

💻 -
afc163

💻 +
于向前

💻 +
afc163

💻
Martin Jul

💻
jhwong

💻
Jingsong Gao

💻
Mr小刘

💻 + +
ntscshen

💻
yiminanci

💻
ai-qing-hai

💻 - -
xrkffgg

💻
Dawnlck

💻
Karis

💻 + +
Mayne

💻
Plortinus

💻
Shanjie Chen

💻
Yang Libin

💻 - -
beewolf233

💻
lqzhgood

💻 + +
neoddish

💻
stack-stark

💻
vector

💻 diff --git a/package.json b/package.json index 5181fbbcc8..df7c5b42c2 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,7 @@ "changelog": "generate-changelog", "prepublishOnly": "run-s lint test build", "analyze": "webpack --profile --json > dist/stats.json && webpack-bundle-analyzer ./dist/stats.json", - "contributors:add": "all-contributors add", - "contributors:check": "all-contributors check" + "contributors:add": "all-contributors add" }, "husky": { "hooks": { diff --git a/scripts/init-contributors.js b/scripts/init-contributors.js index 721d997b33..eba247a81f 100644 --- a/scripts/init-contributors.js +++ b/scripts/init-contributors.js @@ -19,14 +19,13 @@ async function queryContributors(owner, repo, page = 1) { } function exec() { - // 方式1: Get contributors by run `npm run contributors:check` + // 方式1: Get contributors by run `all-contributors check` // 方式2: queryContributors queryContributors('antvis', 'g2plot').then((contributors) => { - shell.echo('contributors', contributors.length); contributors .sort((a, b) => b.contributions - a.contributions) .forEach((contributor) => { - shell.exec(`tnpm run contributors:add ${contributor.login} code`); + shell.exec(`npm run contributors:add ${contributor.login} code`); }); }); }