From bfe872050dcc4b842a97df896e7ca1771e64f828 Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Sun, 4 Jun 2023 17:15:01 +0800 Subject: [PATCH] refactor(main): add translator for ci (#3264) --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/ISSUE_TEMPLATE/config.yml | 12 +++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/ISSUE_TEMPLATE/question.yml | 16 ---------- .github/labeler.yml | 35 ++++++++++++++++++--- .github/workflows/bot-issues-translator.yml | 19 +++++++++++ .github/workflows/bot-link.yml | 2 +- MAINTAINERS.md | 14 +++++---- lychee.toml | 5 +++ 9 files changed, 77 insertions(+), 29 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/question.yml create mode 100644 .github/workflows/bot-issues-translator.yml create mode 100644 lychee.toml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 85e4af8a6..b7558325a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,7 @@ name: 🐞 Sealos Bug report description: Create a report to help us improve title: 'BUG: brief description of the bug' +labels: kind/bug body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..0c6478920 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,12 @@ +blank_issues_enabled: true +contact_links: + - name: Ask a question (GitHub Discussions) + url: https://github.com/labring/sealos/discussions + about: | + Please do not submit "a bug report" for asking a question. + In most cases, GitHub Discussions is the best place to ask a question. + If you are not sure whether you are going to report a bug or ask a question, + please consider asking in GitHub Discussions first. + - name: Join Our Discord + url: https://discord.gg/eHyXHtSE + about: Join our community, we will keep you in the loop. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 05b62a227..5379a93bc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,6 +1,6 @@ name: "\U0001F680 Sealos feature request" description: Suggest an idea for this project -labels: ["feature-request"] +labels: kind/feature title: 'Feature: brief description of the feature' body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml deleted file mode 100644 index befdbbb34..000000000 --- a/.github/ISSUE_TEMPLATE/question.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "\U00002753 Ask a question" -description: Ask a question about using Sealos -title: 'Question: brief description of the question' -body: - - type: markdown - attributes: - value: | - Please fill in as much of the following form as you're able. - - type: textarea - attributes: - label: Detailed description of the question. - description: eg. Detailed description of the question. - - type: textarea - attributes: - label: Some reference materials you see. - description: eg. the reference of the documentation. diff --git a/.github/labeler.yml b/.github/labeler.yml index bdff1b620..a1344ee47 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,5 @@ +#Usage in github: https://github.com/actions/labeler + area/command: - any: [ 'cmd/**/*' ] @@ -8,7 +10,8 @@ area/qa: - 'QA.md' area/test: - - any: [ '**/*_test.go','test/**/*' ] + - '**/*_test.go' + - 'test/**/*' area/imageCRIShim: @@ -24,7 +27,9 @@ area/clusterfile: - any: [ 'pkg/clusterfile/**/*' ] area/config: - - any: [ 'pkg/config/**/*','pkg/env/**/*','pkg/template/**/*' ] + - any: [ 'pkg/config/**/*' ] + - any: [ 'pkg/env/**/*' ] + - any: [ 'pkg/template/**/*' ] area/guest: - any: [ 'pkg/guest/**/*' ] @@ -48,7 +53,8 @@ area/ipvs: - any: [ 'pkg/ipvs/**/*' ] area/ssh: - - any: [ 'pkg/ssh/**/*' ,'pkg/remote/**/*' ] + - any: [ 'pkg/ssh/**/*' ] + - any: [ 'pkg/remote/**/*' ] area/registry: - any: [ 'pkg/registry/**/*' ] @@ -57,13 +63,32 @@ area/runtime: - any: [ 'pkg/runtime/**/*' ] area/api: - - any: [ 'pkg/types/**/*','**/*_types.go' ] + - any: [ 'pkg/types/**/*'] + - any: [ '**/*_types.go' ] area/cloud: - any: [ 'controllers/**/*' ] + - any: [ 'service/**/*' ] + - any: ['docs/4.0/docs/**', '!docs/4.0/docs/lifecycle-management/**'] + - any: ['docs/4.0/i18n/zh-Hans/**', '!docs/4.0/i18n/zh-Hans/lifecycle-management/**'] + +area/lifecycle-management: + - any: [ 'pkg/**/*' ] + - any: [ 'staging/**/*' ] + - any: [ 'docs/4.0/docs/lifecycle-management/*' ] + - any: [ 'docs/4.0/i18n/zh-Hans/lifecycle-management/*' ] + area/frontend: - any: [ 'frontend/**/*' ] area/ci: - - any: [ '.github/**/*','scripts/**/*' ,'docker/**/*' ,'deploy/**/*' ,'.golangci.yml' ,'.goreleaser.yml','Makefile' ] + - 'scripts/**/*' + - 'docker/**/*' + - 'deploy/**/*' + - '.golangci.yml' + - '.goreleaser.yml' + - 'Makefile' + +area/workflow: + - any: [ '.github/**' ] diff --git a/.github/workflows/bot-issues-translator.yml b/.github/workflows/bot-issues-translator.yml new file mode 100644 index 000000000..bc29458d8 --- /dev/null +++ b/.github/workflows/bot-issues-translator.yml @@ -0,0 +1,19 @@ +name: 'Github Rebot for issues-translator' +on: + issues: + types: [ opened ] + issue_comment: + types: [ created ] +jobs: + translate: + permissions: + issues: write + discussions: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: usthe/issues-translate-action@v2.7 + with: + IS_MODIFY_TITLE: true + BOT_GITHUB_TOKEN: ${{ secrets.GH_PAT }} + CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ diff --git a/.github/workflows/bot-link.yml b/.github/workflows/bot-link.yml index 9d680fa6a..08ee660c8 100644 --- a/.github/workflows/bot-link.yml +++ b/.github/workflows/bot-link.yml @@ -24,7 +24,7 @@ jobs: # docs/.vitepress/dist the site directory to check # ./*.md all markdown files in the root directory - args: --verbose -E -i --no-progress --exclude-path './CHANGELOG' './**/*.md' + args: --verbose './**/*.md' env: GITHUB_TOKEN: ${{secrets.GH_PAT}} diff --git a/MAINTAINERS.md b/MAINTAINERS.md index d7ee92971..0035dd85f 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -2,19 +2,21 @@ maintainers: - fanux - cuisongliu -- ysicing -- oldthreefeng -- zhangguanzhang -- berlinsaint +- fengxsong +- bxy4543 +- LeezQ +- yangchuansheng +- zzjin reviewers: - fanux - cuisongliu -- berlinsaint +- zzjin approvers: - fanux - cuisongliu -- berlinsaint \ No newline at end of file +- zzjin + diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 000000000..fea8b6daa --- /dev/null +++ b/lychee.toml @@ -0,0 +1,5 @@ +exclude_path = ["./CHANGELOG", "./docs/3.0"] +verbose = "info" +exclude_all_private = true +insecure = true +no_progress = true