diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 948ddf7219c..a11143e3272 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,6 @@ jobs: release: if: contains(github.event.head_commit.message, 'chore(versions)') steps: - - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: @@ -23,6 +22,7 @@ jobs: env: NODE_OPTIONS: --max_old_space_size=4096 NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }} REGISTRY: https://registry.npmjs.org diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 5c20ce2bf8d..4981ee2eed4 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -10,6 +10,9 @@ "untracked", "Untracking", "Unmount", + "octokit", + "repos", + "alibaba", "antd", "Antd", "alifd", diff --git a/docs/functions/contributors.ts b/docs/functions/contributors.ts new file mode 100644 index 00000000000..60374da4598 --- /dev/null +++ b/docs/functions/contributors.ts @@ -0,0 +1,21 @@ +import { Handler } from '@netlify/functions' +import { Octokit } from '@octokit/rest' + +const octokit = new Octokit({ + baseUrl: 'https://api.github.com', + auth: process.env.GITHUB_TOKEN, +}) + +export const handler: Handler = async () => { + return { + statusCode: 200, + body: JSON.stringify( + await octokit.repos.listContributors({ + owner: 'alibaba', + repo: 'formily', + per_page: 1000, + page: 1, + }) + ), + } +} diff --git a/docs/site/Contributors.tsx b/docs/site/Contributors.tsx new file mode 100644 index 00000000000..cc30093a52b --- /dev/null +++ b/docs/site/Contributors.tsx @@ -0,0 +1,19 @@ +import React, { useEffect, useState } from 'react' + +export const Contributors: React.FC = () => { + const [contributors, setContributors] = useState() + useEffect(() => { + fetch('./.netlify/functions/contributors') + .then((res) => res.json()) + .then(({ data }) => { + setContributors(data) + }) + }, []) + return ( +
+ {contributors.map((user, key) => ( +
+ ))} +
+ ) +} diff --git a/package.json b/package.json index 4ec515001ea..63a678f1ea6 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "@testing-library/jest-dom": "^5.0.0", "@testing-library/react": "^11.2.3", "@testing-library/vue": "^5.6.2", + "@netlify/functions": "^0.7.2", "@types/fs-extra": "^8.1.0", "@types/hoist-non-react-statics": "^3.3.1", "@types/jest": "^24.0.18", diff --git a/yarn.lock b/yarn.lock index 20d2f5765d0..05fc09157a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1156,12 +1156,12 @@ resolved "https://registry.yarnpkg.com/@ctrl/tinycolor/-/tinycolor-3.4.0.tgz#c3c5ae543c897caa9c2a68630bed355be5f9990f" integrity sha512-JZButFdZ1+/xAfpguQHoabIXkcqRRKpMrWKBkpEZZyxfY9C1DpADFB8PEqGSTeFr135SaTRfKqGKx5xSCLI7ZQ== -"@designable/core@0.4.21", "@designable/core@^0.4.21": - version "0.4.21" - resolved "https://registry.yarnpkg.com/@designable/core/-/core-0.4.21.tgz#bf42b07f3d2c11f2378fd05316edb336f764c152" - integrity sha512-6Zld3eaE/1PTC+WhHEiKO0zvXc/avTFz+27KoOvYQprox+BaibnFwOyA1qb1zp6qUryJbD2Fgf0mk8tCtclxwA== +"@designable/core@0.4.22", "@designable/core@^0.4.22": + version "0.4.22" + resolved "https://registry.yarnpkg.com/@designable/core/-/core-0.4.22.tgz#805b3e141bf0105457d34cf2311bef89020f9b87" + integrity sha512-GNzomnu7qkVYCWDklOv5it9d08XpNTB0jM3A/eosHF1g953t5OGXQOR5UgEOmD5Z4mVFvQJJ+TPSEmiTMgqcqw== dependencies: - "@designable/shared" "0.4.21" + "@designable/shared" "0.4.22" "@formily/json-schema" "^2.0.0-beta.76" "@formily/path" "^2.0.0-beta.76" "@formily/reactive" "^2.0.0-beta.76" @@ -1178,25 +1178,25 @@ "@formily/reactive" "^2.0.0-beta.50" "@juggle/resize-observer" "^3.3.1" -"@designable/formily@^0.4.21": - version "0.4.21" - resolved "https://registry.yarnpkg.com/@designable/formily/-/formily-0.4.21.tgz#264641a6d38071a46a0d922af341e17a6436a16d" - integrity sha512-2WbemI1KyDK6+wqRgt7tNyu/v5qbu/NNChj9se3MPZLsfadvVSAalMzO+ZVps91qTOXdf1RhQ4Ve8wyWxq2poA== +"@designable/formily@^0.4.22": + version "0.4.22" + resolved "https://registry.yarnpkg.com/@designable/formily/-/formily-0.4.22.tgz#325e7aa308a1755238d5c8a7fd95d0a6dcc5a0a4" + integrity sha512-jnZkfyf0w1c6iI4yUrr5KCJA+0lUAsxs6Oldgrp8hL/WWh3NLKxtnwelORG9P4GZtqLCvJOgTgA159y8+avAEA== dependencies: - "@designable/core" "0.4.21" - "@designable/shared" "0.4.21" + "@designable/core" "0.4.22" + "@designable/shared" "0.4.22" "@formily/core" "^2.0.0-beta.76" "@formily/json-schema" "^2.0.0-beta.76" -"@designable/react-settings-form@^0.4.21": - version "0.4.21" - resolved "https://registry.yarnpkg.com/@designable/react-settings-form/-/react-settings-form-0.4.21.tgz#fb6f2a6d3638ef9cccb997db8783441ecd5ef672" - integrity sha512-OoD77190ayvycTxKOYTGi4vargI3qsTHG9a22VCTqAi6nl87/TtSmp7Ttrwq3G9qq8C1QUpNuvZTdG0mFNRQPg== +"@designable/react-settings-form@^0.4.22": + version "0.4.22" + resolved "https://registry.yarnpkg.com/@designable/react-settings-form/-/react-settings-form-0.4.22.tgz#e0a9acb8dc041817f249f152e77e898180724db0" + integrity sha512-WWz9Jft2xMjwh9298tV8Url7AWZ/SKHB6TpJCH8r7fNO2Nm8seHrqvaCYqQojxCRC0G0t7NGRzxcWDAQrsojKw== dependencies: "@babel/parser" "^7.14.7" - "@designable/core" "0.4.21" - "@designable/react" "0.4.21" - "@designable/shared" "0.4.21" + "@designable/core" "0.4.22" + "@designable/react" "0.4.22" + "@designable/shared" "0.4.22" "@formily/antd" "^2.0.0-beta.76" "@formily/core" "^2.0.0-beta.76" "@formily/react" "^2.0.0-beta.76" @@ -1209,13 +1209,13 @@ react-color "^2.19.3" react-tiny-popover "^6.0.5" -"@designable/react@0.4.21", "@designable/react@^0.4.21": - version "0.4.21" - resolved "https://registry.yarnpkg.com/@designable/react/-/react-0.4.21.tgz#fd21f18451e544d5f3c0bd1b336d8697e311c0bb" - integrity sha512-vQC7jsXPgbCvOxqG7oI3sZ0ioJTvo5AAV+tKaMfSfnqosFGhW60+E34iTDf/UiQ7doETO+hLtwCoPfM8O2m5Gw== +"@designable/react@0.4.22", "@designable/react@^0.4.22": + version "0.4.22" + resolved "https://registry.yarnpkg.com/@designable/react/-/react-0.4.22.tgz#e862ee38694c134ddb800f5edbef53c9f1ff853e" + integrity sha512-+lcIzSy++8rCOtZWbHXWhcAQXHGApSbXAWQD/dRsRaRECtX8Og43Jut5tDiCWDN9e3sS4uvsE1v8IZB/Im5wqA== dependencies: - "@designable/core" "0.4.21" - "@designable/shared" "0.4.21" + "@designable/core" "0.4.22" + "@designable/shared" "0.4.22" "@formily/reactive" "^2.0.0-beta.76" "@formily/reactive-react" "^2.0.0-beta.76" "@juggle/resize-observer" "^3.3.1" @@ -1227,10 +1227,10 @@ dependencies: requestidlecallback "^0.3.0" -"@designable/shared@0.4.21": - version "0.4.21" - resolved "https://registry.yarnpkg.com/@designable/shared/-/shared-0.4.21.tgz#8c81620ee07a0c9743cba99b483ed633e9581ac7" - integrity sha512-r3sKXBssSlEbor43V3+KpC58f/gFZ59eKoVKgk8vt/KolSpQB4t2FQ37kJD4kmlz1J2bcySmLh95HzjRM1P4PA== +"@designable/shared@0.4.22": + version "0.4.22" + resolved "https://registry.yarnpkg.com/@designable/shared/-/shared-0.4.22.tgz#e0ba9f67bb878d447e88a9d56b1936c74f807c3c" + integrity sha512-2NcSgxm8+tMibC6tOkDPZhJv7yMC9Ruo19HA6B2gAFqrEBxiFkZw8QDgB707X1BdcaU79RVC2Q9H7StY7ZK5xw== dependencies: requestidlecallback "^0.3.0" @@ -2340,6 +2340,13 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" +"@netlify/functions@^0.7.2": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@netlify/functions/-/functions-0.7.2.tgz#9d39553b94e7aaa86dddf515bdbaed3e89998122" + integrity sha512-xf45ZqQukMxmlkqNMC5BXdFMaVZ8VqF42MV5zA5nKVOh2V0mhYlcbTYlVbS/K2/rtvQ3W8lxxixYl4NT7kq6Bg== + dependencies: + is-promise "^4.0.0" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -10407,6 +10414,11 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== +is-promise@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" + integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== + is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"