From 94f410241fee4cba087486958d02575847533765 Mon Sep 17 00:00:00 2001 From: YongGit <1013588891@qq.com> Date: Sat, 8 Mar 2025 22:55:58 +0800 Subject: [PATCH 1/2] chore: issue help --- .github/auto_assign.yml | 30 ---------------------------- .github/gitleaks.yml | 15 ++++++++++++++ .github/issue-close-require.yml | 26 ++++++++++++++++++++++++ .github/issue-reply.yml | 35 +++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 30 deletions(-) delete mode 100644 .github/auto_assign.yml create mode 100644 .github/gitleaks.yml create mode 100644 .github/issue-close-require.yml create mode 100644 .github/issue-reply.yml diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml deleted file mode 100644 index dffe542a..00000000 --- a/.github/auto_assign.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Set to true to add reviewers to pull requests -addReviewers: true - -# Set to true to add assignees to pull requests -addAssignees: author - -# A list of reviewers to be added to pull requests (GitHub user name) -reviewers: - - Jonghakseo - -# A number of reviewers added to the pull request -# Set 0 to add all the reviewers (default: 0) -numberOfReviewers: 0 - -# A list of assignees, overrides reviewers if set -# assignees: -# - assigneeA - -# A number of assignees to add to the pull request -# Set to 0 to add all of the assignees. -# Uses numberOfReviewers if unset. -# numberOfAssignees: 2 - -# A list of keywords to be skipped the process that add reviewers if pull requests include it -# skipKeywords: -# - wip - -filterLabels: - exclude: - - dependencies diff --git a/.github/gitleaks.yml b/.github/gitleaks.yml new file mode 100644 index 00000000..34c9b860 --- /dev/null +++ b/.github/gitleaks.yml @@ -0,0 +1,15 @@ +name: gitleaks + +on: [push, pull_request] + +jobs: + gitleaks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: wget + uses: wei/wget@v1 + with: + args: -O .gitleaks.toml https://raw.githubusercontent.com/ycjcl868/gitleaks/master/.gitleaks.toml + - name: gitleaks-action + uses: gitleaks/gitleaks-action@v1.6.0 diff --git a/.github/issue-close-require.yml b/.github/issue-close-require.yml new file mode 100644 index 00000000..b3ada611 --- /dev/null +++ b/.github/issue-close-require.yml @@ -0,0 +1,26 @@ +name: Issue Close Require + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + close-issues: + runs-on: ubuntu-latest + steps: + - name: need reproduce + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + labels: '🤔 Need Reproduce' + inactive-day: 3 + + - name: needs more info + uses: actions-cool/issues-helper@v3 + with: + actions: 'close-issues' + labels: 'needs more info' + inactive-day: 7 + body: | + Since the issue was labeled with `needs more info`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply. + 由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。 diff --git a/.github/issue-reply.yml b/.github/issue-reply.yml new file mode 100644 index 00000000..d951b34d --- /dev/null +++ b/.github/issue-reply.yml @@ -0,0 +1,35 @@ +name: Issue Reply + +on: + issues: + types: [labeled] + +jobs: + reply-helper: + runs-on: ubuntu-latest + steps: + - name: help wanted + if: github.event.label.name == 'help wanted' + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to [send us a Pull Request](https://help.github.com/en/articles/creating-a-pull-request) for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the [Pull Request Template](https://github.com/alibaba/hooks/blob/master/.github/PULL_REQUEST_TEMPLATE.md) here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! + + 你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎直接在此仓库 [创建一个 Pull Request](https://help.github.com/en/articles/creating-a-pull-request) 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的[预设模板](https://github.com/alibaba/hooks/blob/master/.github/PULL_REQUEST_TEMPLATE.md),提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 + + ![giphy](https://user-images.githubusercontent.com/507615/62342668-4735dc00-b51a-11e9-92a7-d46fbb1cc0c7.gif) + + - name: 🤔 Need Reproduce + if: github.event.label.name == '🤔 Need Reproduce' + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this link https://codesandbox.io/p/devbox/vue-hooks-plus-reproduction-dm8h76 or a minimal GitHub repository. Issues labeled by `Need Reproduce` will be closed if no activities in 3 days. + + 你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://codesandbox.io/p/devbox/vue-hooks-plus-reproduction-dm8h76) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。 + + ![](https://gw.alipayobjects.com/zos/antfincdn/y9kwg7DVCd/reproduce.gif) From 9cd5e117a7f5349d5aea6a868542e43e2c2e38a7 Mon Sep 17 00:00:00 2001 From: YongGit <1013588891@qq.com> Date: Sat, 8 Mar 2025 22:58:54 +0800 Subject: [PATCH 2/2] chore: issue help --- .github/auto-comment.yml | 21 ------------------- .github/workflows/auto-assign.yml | 12 ----------- .github/{ => workflows}/gitleaks.yml | 0 .../{ => workflows}/issue-close-require.yml | 0 .github/{ => workflows}/issue-reply.yml | 0 5 files changed, 33 deletions(-) delete mode 100644 .github/auto-comment.yml delete mode 100644 .github/workflows/auto-assign.yml rename .github/{ => workflows}/gitleaks.yml (100%) rename .github/{ => workflows}/issue-close-require.yml (100%) rename .github/{ => workflows}/issue-reply.yml (100%) diff --git a/.github/auto-comment.yml b/.github/auto-comment.yml deleted file mode 100644 index 3c25536d..00000000 --- a/.github/auto-comment.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 90 -# Number of days of inactivity before a stale Issue or Pull Request is closed -daysUntilClose: 30 -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - pinned - - security -# Label to use when marking as stale -staleLabel: stale -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when removing the stale label. Set to `false` to disable -unmarkComment: false -# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable -closeComment: true -# Limit to only `issues` or `pulls` -only: issues diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml deleted file mode 100644 index f4c725e2..00000000 --- a/.github/workflows/auto-assign.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Auto Assign' -on: - pull_request: - types: [opened, ready_for_review] - -jobs: - add-reviews: - runs-on: ubuntu-latest - steps: - - uses: kentaro-m/auto-assign-action@v1.2.5 - with: - configuration-path: '.github/auto_assign.yml' diff --git a/.github/gitleaks.yml b/.github/workflows/gitleaks.yml similarity index 100% rename from .github/gitleaks.yml rename to .github/workflows/gitleaks.yml diff --git a/.github/issue-close-require.yml b/.github/workflows/issue-close-require.yml similarity index 100% rename from .github/issue-close-require.yml rename to .github/workflows/issue-close-require.yml diff --git a/.github/issue-reply.yml b/.github/workflows/issue-reply.yml similarity index 100% rename from .github/issue-reply.yml rename to .github/workflows/issue-reply.yml