mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
added issue/pr label workflows
3 months of inactivity Bot posts a comment to remind about it and assigns a stale label No further activity - 5 work days passes bot closes the issue
This commit is contained in:
2
.github/close-label.yml
vendored
Normal file
2
.github/close-label.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
🐛 Bug: ✅ Fixed
|
||||||
|
🦄 Feature Request: ✅ Implemented
|
28
.github/workflows/add-comment-from-tag.yml
vendored
Normal file
28
.github/workflows/add-comment-from-tag.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# Based on a label applied to an issue, the bot will add a comment with some additional info
|
||||||
|
|
||||||
|
name: 🎯 Auto-Reply to Labeled Tickets
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- unlabeled
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- unlabeled
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
comment:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Label Commenter
|
||||||
|
uses: peaceiris/actions-label-commenter@v1
|
||||||
|
with:
|
||||||
|
config_file: .github/issue-auto-comments.yml
|
||||||
|
github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
16
.github/workflows/check-merge-conflicts.yml
vendored
Normal file
16
.github/workflows/check-merge-conflicts.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Detect and label pull requests that have merge conflicts
|
||||||
|
name: 🏗️ Check Merge Conflicts
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- staging
|
||||||
|
jobs:
|
||||||
|
check-conflicts:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: mschilde/auto-label-merge-conflicts@master
|
||||||
|
with:
|
||||||
|
CONFLICT_LABEL_NAME: "🚫 Merge Conflicts"
|
||||||
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
MAX_RETRIES: 5
|
||||||
|
WAIT_MS: 5000
|
82
.github/workflows/close-stale-issues.yml
vendored
Normal file
82
.github/workflows/close-stale-issues.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# Closes any issues that no longer have user interaction
|
||||||
|
name: 🎯 Close Stale Issues
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *' # Runs every day at midnight UTC
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Comment on, then close issues that haven't been updated for ages
|
||||||
|
- name: Close Stale Issues
|
||||||
|
uses: actions/stale@v4
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
days-before-stale: 360
|
||||||
|
days-before-close: 5
|
||||||
|
operations-per-run: 30
|
||||||
|
remove-stale-when-updated: true
|
||||||
|
enable-statistics: true
|
||||||
|
stale-issue-message: >
|
||||||
|
This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below.
|
||||||
|
Otherwise it will be closed in 5 working days.
|
||||||
|
stale-pr-message: >
|
||||||
|
This PR is stale because it has been open 6 weeks with no activity. Either remove the stale label or comment below with a short update,
|
||||||
|
otherwise this PR will be closed in 5 days.
|
||||||
|
close-issue-message: >
|
||||||
|
This issue was automatically closed because it has been stalled for over 1 year with no activity.
|
||||||
|
close-pr-message: >
|
||||||
|
This pull request was automatically closed because it has been stalled for over 1 year with no activity.
|
||||||
|
stale-issue-label: '⚰️ Stale'
|
||||||
|
close-issue-label: '🕸️ Inactive'
|
||||||
|
stale-pr-label: '⚰️ Stale'
|
||||||
|
close-pr-label: '🕸️ Inactive'
|
||||||
|
exempt-issue-labels: '📌 Keep Open'
|
||||||
|
exempt-pr-labels: '📌 Keep Open'
|
||||||
|
labels-to-add-when-unstale: '📌 Keep Open'
|
||||||
|
|
||||||
|
# Comment on, then close issues that required a response from the user, but didn't get one
|
||||||
|
- name: Close Issues without Response
|
||||||
|
uses: actions/stale@v4
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
days-before-stale: 5
|
||||||
|
days-before-close: 3
|
||||||
|
operations-per-run: 30
|
||||||
|
remove-stale-when-updated: true
|
||||||
|
stale-issue-message: >
|
||||||
|
Hi! Looks like additional info is required for this issue to be addressed.
|
||||||
|
Don't forget to provide this within the next few days to keep your ticket open.
|
||||||
|
close-issue-message: 'Issue closed due to no response from user.'
|
||||||
|
only-labels: '🚏 Awaiting User Response'
|
||||||
|
labels-to-remove-when-unstale: '🚏 Awaiting User Response, 🛑 No Response'
|
||||||
|
stale-issue-label: '🛑 No Response'
|
||||||
|
close-issue-label: '🕸️ Inactive'
|
||||||
|
exempt-issue-labels: '📌 Keep Open'
|
||||||
|
exempt-pr-labels: '📌 Keep Open'
|
||||||
|
|
||||||
|
# Comment on issues that we should have replied to
|
||||||
|
- name: Notify Repo Owner to Respond
|
||||||
|
uses: actions/stale@v4
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
days-before-stale: 7
|
||||||
|
days-before-close: 365
|
||||||
|
operations-per-run: 30
|
||||||
|
remove-stale-when-updated: true
|
||||||
|
stale-issue-message: Hey SillyTavern, - Don't forget to respond!
|
||||||
|
stale-pr-message: Hey SillyTavern, - Don't forget to respond!
|
||||||
|
only-labels: '👤 Awaiting Maintainer Response'
|
||||||
|
labels-to-remove-when-unstale: '👤 Awaiting Maintainer Response'
|
||||||
|
close-issue-message: 'Closed due to no response from repo author for over a year'
|
||||||
|
close-pr-message: 'Closed due to no response from repo author for over a year'
|
||||||
|
stale-issue-label: '👤 Awaiting Maintainer Response'
|
||||||
|
stale-pr-label: '👤 Awaiting Maintainer Response'
|
||||||
|
close-issue-label: '🕸️ Inactive'
|
||||||
|
close-pr-label: '🕸️ Inactive'
|
||||||
|
exempt-issue-labels: '📌 Keep Open'
|
||||||
|
exempt-pr-labels: '📌 Keep Open'
|
39
.github/workflows/get-pr-size.yml
vendored
Normal file
39
.github/workflows/get-pr-size.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# Adds a comment to new PRs, showing the compressed size and size difference of new code
|
||||||
|
# And also labels the PR based on the number of lines changes
|
||||||
|
|
||||||
|
name: 🌈 Check PR Size
|
||||||
|
on: [pull_request]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
# Find and comment with compressed size
|
||||||
|
- name: Get Compressed Size
|
||||||
|
uses: preactjs/compressed-size-action@v2
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
pattern: './dist/**/*.{js,css,html}'
|
||||||
|
strip-hash: '\\b\\w{8}\\.'
|
||||||
|
exclude: '**/node_modules/**'
|
||||||
|
minimum-change-threshold: 100
|
||||||
|
# Check number of lines of code added
|
||||||
|
- name: Label based on Lines of Code
|
||||||
|
uses: codelytv/pr-size-labeler@v1
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
xs_max_size: '10'
|
||||||
|
s_max_size: '100'
|
||||||
|
m_max_size: '500'
|
||||||
|
l_max_size: '1000'
|
||||||
|
s_label: '🟩 PR - Small'
|
||||||
|
m_label: '🟨 PR - Medium'
|
||||||
|
l_label: '🟧 PR - Large'
|
||||||
|
xl_label: '🟥 PR - XL'
|
||||||
|
fail_if_xl: 'false'
|
||||||
|
message_if_xl: >
|
||||||
|
It looks like this PR is very large (over 1000 lines).
|
||||||
|
Try to avoid addressing multiple issues in a single PR, and
|
||||||
|
in the future consider breaking large tasks down into smaller steps.
|
||||||
|
This it to make reviewing, testing, reverting and general quality management easier.
|
17
.github/workflows/manage-pending-labels-closed.yml
vendored
Normal file
17
.github/workflows/manage-pending-labels-closed.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# When a new comment is added to an issue, if it had the Stale or Awaiting User Response labels, then those labels will be removed
|
||||||
|
|
||||||
|
name: 🎯 Remove Pending Labels on Close
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [closed]
|
||||||
|
jobs:
|
||||||
|
remove-labels:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Remove Labels when Closed
|
||||||
|
uses: actions-cool/issues-helper@v2
|
||||||
|
with:
|
||||||
|
actions: remove-labels
|
||||||
|
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
labels: '🚏 Awaiting User Response,⚰️ Stale,👤 Awaiting Maintainer Response'
|
42
.github/workflows/manage-pending-labels.yml
vendored
Normal file
42
.github/workflows/manage-pending-labels.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# When a new comment is added to an issue, if it had the Stale or Awaiting User Response labels, then those labels will be removed
|
||||||
|
|
||||||
|
name: 🎯 Add/ Remove Awaiting Response Labels
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
jobs:
|
||||||
|
remove-stale:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.comment.author_association != 'COLLABORATOR' && github.event.comment.author_association != 'OWNER' }}
|
||||||
|
steps:
|
||||||
|
- name: Remove Stale labels when Updated
|
||||||
|
uses: actions-cool/issues-helper@v2
|
||||||
|
with:
|
||||||
|
actions: remove-labels
|
||||||
|
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
labels: '🚏 Awaiting User Response,⚰️ Stale'
|
||||||
|
|
||||||
|
add-awaiting-author:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{!github.event.issue.pull_request && github.event.comment.author_association != 'COLLABORATOR' && github.event.comment.author_association != 'OWNER' && github.event.issue.state == 'open' }}
|
||||||
|
steps:
|
||||||
|
- name: Add Awaiting Author labels when Updated
|
||||||
|
uses: actions-cool/issues-helper@v2
|
||||||
|
with:
|
||||||
|
actions: add-labels
|
||||||
|
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
labels: '👤 Awaiting Maintainer Response'
|
||||||
|
|
||||||
|
remove-awaiting-author:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.comment.author_association == 'OWNER' }}
|
||||||
|
steps:
|
||||||
|
- name: Remove Awaiting Author labels when Updated
|
||||||
|
uses: actions-cool/issues-helper@v2
|
||||||
|
with:
|
||||||
|
actions: remove-labels
|
||||||
|
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
labels: '👤 Awaiting Maintainer Response'
|
Reference in New Issue
Block a user