Skip to content

Commit

Permalink
ci: automatic issue closer (#4213)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Oct 8, 2024
1 parent 03937c7 commit 3ef6d41
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/01_formatter_bug.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 📝 Formatter bug report
description: Report a bug or regression of the formatter
title: "📝 <TITLE>"
labels: [ "S-To triage" ]
labels: [ "S-Needs triage" ]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02_lint_bug.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 💅 Linter bug report
description: Report a bug or regression of the linter
title: "💅 <TITLE>"
labels: [ "S-To triage" ]
labels: [ "S-Needs triage" ]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03_bug.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 🐛 Bug Report
description: Report a possible bug or regression
title: "🐛 <TITLE>"
labels: [ "S-To triage" ]
labels: [ "S-Needs triage" ]
body:
- type: markdown
attributes:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/close-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Close issues

on:
schedule:
- cron: "0 0 * * *"

jobs:
close-issues:
if: github.repository == 'biomejs/biome'
runs-on: ubuntu-latest
steps:
- name: Close issue without reproduction
uses: actions-cool/issues-helper@v3
with:
actions: "close-issues"
token: ${{ secrets.GITHUB_TOKEN }}
labels: "S-Needs repro"
inactive-day: 3
35 changes: 35 additions & 0 deletions .github/workflows/needs-repro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Needs reproduction

on:
issues:
types: [ labeled ]

jobs:
reply-labeled:
if: github.repository == 'biomejs/biome'
runs-on: ubuntu-latest
steps:
- name: Remove triaging label
if: contains(github.event.issue.labels.*.name, 'S-Bug-confirmed') && contains(github.event.issue.labels.*.name, 'S-Needs triage')
uses: actions-cool/issues-helper@v3
with:
actions: "remove-labels"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: "S-Needs triage"

- name: Needs reproduction
if: github.event.label.name == 'S-Needs repro'
uses: actions-cool/issues-helper@v3
with:
actions: "create-comment, remove-labels"
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}, please provide a minimal reproduction. You can use one of the following options:
- Provide a link to [our playground](https://biomejs.dev/playground), if it's applicable.
- Provide a link to GitHub repository. To easily create a reproduction, you can use our interactive CLI via `npm create @biomejs/biome-reproduction`
Issues marked with `S-Needs repro` will be **closed** if they have **no activity within 3 days**.
labels: "S-Needs triage"

0 comments on commit 3ef6d41

Please sign in to comment.