Skip to content

Commit

Permalink
Merge branch 'DataLinkDC:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 authored Jan 24, 2024
2 parents d22ac2c + 04df91e commit b498e50
Show file tree
Hide file tree
Showing 5 changed files with 247 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/add-assignees.yml
Original file line number Diff line number Diff line change
@@ -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。如有任何问题,可以评论回复。
28 changes: 28 additions & 0 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
@@ -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.
25 changes: 25 additions & 0 deletions .github/workflows/issue-check-inactive.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 天后将关闭,如需回复,可以评论回复。
60 changes: 60 additions & 0 deletions .github/workflows/issue-close-require.yml
Original file line number Diff line number Diff line change
@@ -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,若有任何问题,可评论回复。
64 changes: 64 additions & 0 deletions .github/workflows/issue-reply.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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\` 。

0 comments on commit b498e50

Please sign in to comment.