Skip to content

Commit

Permalink
ci: autoclose needs reproduction, lock closed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Feb 26, 2024
1 parent 93027e1 commit 8c487c1
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/issue-close-require.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Issue Close Require

on:
schedule:
- cron: '0 0 * * *'

jobs:
close-issues:
runs-on: ubuntu-latest
steps:
- name: needs reproduction
uses: actions-cool/issues-helper@v3
with:
actions: close-issues
token: ${{ secrets.GITHUB_TOKEN }}
labels: needs reproduction
inactive-day: 3
19 changes: 19 additions & 0 deletions .github/workflows/issue-labeled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Issue Labeled

on:
issues:
types: [labeled]

jobs:
reply-labeled:
runs-on: ubuntu-latest
steps:
- name: needs reproduction
if: github.event.label.name == 'needs reproduction'
uses: actions-cool/issues-helper@v3
with:
actions: create-comment
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [StackBlitz](https://vitest.new) (you can also use [examples](https://github.com/vitest-dev/vitest/tree/main/examples)). Issues marked with `needs reproduction` will be closed if they have no activity within 3 days.
24 changes: 24 additions & 0 deletions .github/workflows/lock-closed-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lock Closed Issues

on:
schedule:
- cron: '0 0 * * *'

permissions:
issues: write

jobs:
action:
if: github.repository == 'vitest-dev/vscode'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: '14'
# issue-comment: |
# This issue has been locked since it has been closed for more than 14 days.
#
# If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vitejs.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions).
issue-lock-reason: ''
process-only: issues

0 comments on commit 8c487c1

Please sign in to comment.