diff --git a/.github/workflows/add-assignees.yml b/.github/workflows/add-assignees.yml new file mode 100644 index 00000000000..e1d30413bf6 --- /dev/null +++ b/.github/workflows/add-assignees.yml @@ -0,0 +1,70 @@ +name: Assign Problem To Developer + +on: + issues: + types: [ opened ] + +jobs: + assign-udf-problem-to-developer: + runs-on: ubuntu-latest + if: contains(github.event.issue.title, 'UDF') == true || contains(github.event.issue.title, 'udf') == true || contains(github.event.issue.title, 'Udf') == true + steps: + - name: assign problem to developer of udf + uses: actions-cool/issues-helper@v3 + with: + actions: 'add-assignees' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + assignees: gaoyan1998,zackyoungh + body: | + Hello @${{ github.event.issue.user.login }}, this issue is about UDF, so I assign it to @gaoyan1998 and @zackyoungh. If you have any questions, you can comment and reply. + + 你好 @${{ github.event.issue.user.login }}, 这个 issue 是关于 UDF 的,所以我把它分配给了 @gaoyan1998 和 @zackyoungh。如有任何问题,可以评论回复。 + + assign-k8s-problem-to-developer: + runs-on: ubuntu-latest + if: contains(github.event.issue.title, 'K8S') == true || contains(github.event.issue.title, 'k8s') == true || contains(github.event.issue.title, 'K8s') == true || contains(github.event.issue.title, 'Kubernetes') == true || contains(github.event.issue.title, 'kubernetes') == true + steps: + - name: assign problem to developer of k8s + uses: actions-cool/issues-helper@v3 + with: + actions: 'add-assignees' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + assignees: gaoyan1998,zackyoungh + body: | + Hello @${{ github.event.issue.user.login }}, this issue is about K8S, so I assign it to @gaoyan1998 and @zackyoungh. If you have any questions, you can comment and reply. + + 你好 @${{ github.event.issue.user.login }}, 这个 issue 是关于 K8S 的,所以我把它分配给了 @gaoyan1998 和 @zackyoungh。如有任何问题,可以评论回复。 + + assign-web-problem-to-developer: + runs-on: ubuntu-latest + if: contains(github.event.issue.title, 'web') == true + steps: + - name: assign problem to developer of web + uses: actions-cool/issues-helper@v3 + with: + actions: 'add-assignees' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + assignees: Zzm0809 + body: | + Hello @${{ github.event.issue.user.login }}, this issue is about web, so I assign it to @Zzm0809. If you have any questions, you can comment and reply. + + 你好 @${{ github.event.issue.user.login }}, 这个 issue 是关于 web 的,所以我把它分配给了 @Zzm0809。如有任何问题,可以评论回复。 + + assign-cdc-problem-to-developer: + runs-on: ubuntu-latest + if: contains(github.event.issue.title, 'cdc') == true || contains(github.event.issue.title, 'CDCSOURCE') == true + steps: + - name: assign problem to developer of cdc and cdcsource + uses: actions-cool/issues-helper@v3 + with: + actions: 'add-assignees' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + assignees: aiwenmo + body: | + Hello @${{ github.event.issue.user.login }}, this issue is about CDC, so I assign it to @aiwenmo. If you have any questions, you can comment and reply. + + 你好 @${{ github.event.issue.user.login }}, 这个 issue 是关于 CDC/CDCSOURCE 的,所以我把它分配给了 @aiwenmo。如有任何问题,可以评论回复。 \ No newline at end of file diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml new file mode 100644 index 00000000000..fd8f997a2c0 --- /dev/null +++ b/.github/workflows/code-review.yml @@ -0,0 +1,28 @@ +name: Code Review Robot + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + test: + # if: ${{ contains(github.event.*.labels.*.name, 'gpt review') }} # Optional; to run only when a label is attached + runs-on: ubuntu-latest + steps: + - uses: anc95/ChatGPT-CodeReview@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + # Optional + LANGUAGE: Chinese + OPENAI_API_ENDPOINT: https://api.openai.com/v1 + MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models + PROMPT: Please check if there are any confusions or irregularities in the following code diffs. If there are, please point them out. If not, please reply with "No problem". # https://platform.openai.com/docs/api-reference/completions/create#completions/create-prompt + top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p + temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature + max_tokens: 10000 + MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length. \ No newline at end of file diff --git a/.github/workflows/issue-check-inactive.yml b/.github/workflows/issue-check-inactive.yml new file mode 100644 index 00000000000..7e484ee2647 --- /dev/null +++ b/.github/workflows/issue-check-inactive.yml @@ -0,0 +1,25 @@ +name: Issue Check Inactive + +# 定时触发:每月 1 号 UTC 0 点,即北京时间 8 点 +# Timed trigger: UTC 0 on the 1st of each month. +on: + schedule: + - cron: "0 0 1 * *" + +jobs: + check-inactive: + runs-on: ubuntu-latest + steps: + - name: check-inactive + uses: actions-cool/issues-helper@v1.7 + with: + actions: 'check-inactive' + token: ${{ secrets.GITHUB_TOKEN }} + # 为 30 天不活跃的 issues 增加 inactive label,更多参数请参考:https://github.com/actions-cool/issues-helper + # Add the inactive label to all issues that have not been active for more than 30 days. More see: https://github.com/actions-cool/issues-helper + inactive-day: 30 + inactive-label: 'inactive' + body: | + Hello @${{ github.event.issue.user.login }}, this issue has not been active for more than 30 days. This issue will be closed in 7 days if there is no response. If you have any questions, you can comment and reply. + + 你好 @${{ github.event.issue.user.login }}, 这个 issue 30 天内没有活跃,7 天后将关闭,如需回复,可以评论回复。 \ No newline at end of file diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml new file mode 100644 index 00000000000..0129ffd6576 --- /dev/null +++ b/.github/workflows/issue-close-require.yml @@ -0,0 +1,60 @@ +name: Issue Close Require + +on: + schedule: + - cron: "0 0 * * *" + +permissions: + contents: read + +jobs: + issue-close-require: + permissions: + issues: write # for actions-cool/issues-helper to update issues + pull-requests: write # for actions-cool/issues-helper to update PRs + runs-on: ubuntu-latest + steps: + - name: need reproduce + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + labels: 'Need Reproduce' + inactive-day: 10 + body: | + Hi,@${{ github.event.issue.user.login }} Because this issue was marked as requiring detailed reproduction steps, no response was received for 10 days. The issue is now closed. If you have any questions, please comment and reply. + + Hi,@${{ github.event.issue.user.login }} 由于该 issue 被标记为需要提供详细复现步骤,却 10 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 + + - name: duplicate issue + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + labels: 'Duplicate' + inactive-day: 3 + body: | + Hi,@${{ github.event.issue.user.login }} Since this issue was marked as a duplicate issue, no response was received for 3 days. The issue is now closed. If you have any questions, please comment and reply + + Hi,@${{ github.event.issue.user.login }} 由于该 issue 被标记为重复问题,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 + + - name: Fixed issue + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + labels: 'Fixed' + inactive-day: 2 + body: | + Hi,@${{ github.event.issue.user.login }} Since this issue was marked as fixed, no response has been received for 2 days. The issue is now closed. If you have any questions, please comment and reply. + + Hi,@${{ github.event.issue.user.login }} 由于该 issue 被标记为已修复,却 2 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 + + + - name: More Information Required + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + labels: 'More Information Required' + inactive-day: 7 + body: | + Hi,@${{ github.event.issue.user.login }} Since this issue was marked as requiring more information, no response was received for 7 days. The issue is now closed. If you have any questions, please comment and reply. + + Hi,@${{ github.event.issue.user.login }} 由于该 issue 被标记为需要更多信息,却 7 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 diff --git a/.github/workflows/issue-reply.yml b/.github/workflows/issue-reply.yml new file mode 100644 index 00000000000..6b034c7fa11 --- /dev/null +++ b/.github/workflows/issue-reply.yml @@ -0,0 +1,64 @@ +name: Issue Check + +on: + issues: + types: [ labeled ] + +jobs: + reply-help: + runs-on: ubuntu-latest + steps: + - name: Need Provide Reproduce Steps + if: github.event.label.name == 'Need Reproduce' + uses: actions-cool/issues-helper@v1.7 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}, we need you to provide reproduction steps so that we can help you troubleshoot the problem. Issues are marked \`Need Reproduce\`. + + 你好 @${{ github.event.issue.user.login }}, 我们需要你提供复现步骤以便于我们帮你排查问题,Issues 标注为 \`Need Reproduce\` 。 + + - name: Action Duplicate Issue + if: github.event.label.name == 'Duplicate' + uses: actions-cool/issues-helper@v1.7 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}, thank you for your feedback, but this issue has been reported before. You can search for keywords in the Issue list to view it. Issues are marked as \`Duplicate\`. + + 你好 @${{ github.event.issue.user.login }}, 感谢你的反馈, 但是此问题已经被反馈过了,你可以在 Issue 列表中搜索关键字来查看, Issues 标注为 \`Duplicate\` 。 + + - name: Action Fixed Issue + if: github.event.label.name == 'Fixed' + uses: actions-cool/issues-helper@v1.7 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}, thank you for your feedback, but this issue has been fixed. You can search for keywords in the Issue list to view it. Issues are marked as \`Fixed\`. + + 你好 @${{ github.event.issue.user.login }}, 感谢你的反馈, 但是此问题已经被修复了,你可以在 Issue 列表中搜索关键字来查看, Issues 标注为 \`Fixed\` 。 + + - name: Action Supported Issue + if: github.event.label.name == 'Supported' + uses: actions-cool/issues-helper@v1.7 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}, thank you for your suggestion, but this function has been implemented. You can search for keywords in the Issue list to view it. Issues are marked \`Supported\` + + 你好 @${{ github.event.issue.user.login }}, 感谢你的建议, 但是此功能已经实现了,你可以在 Issue 列表中搜索关键字来查看, Issues 标注为 \`Supported\` 。 + + - name: Action Wont Fix Issue + if: github.event.label.name == 'Wont Fix' + uses: actions-cool/issues-helper@v1.7 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}, thank you for your feedback, but this issue will not be fixed. You can search for keywords in the Issue list to view it. Issues are marked \`Wont Fix\` + + 你好 @${{ github.event.issue.user.login }}, 感谢你的反馈, 但是此问题不会被修复,你可以在 Issue 列表中搜索关键字来查看, Issues 标注为 \`Wont Fix\` 。 \ No newline at end of file