mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Move unstale to the issue/pr manager
Doesn't make sense to run the scheduled workflow and then skip most of it's jobs. And it looks weird in the PR boxy thingy
This commit is contained in:
22
.github/workflows/issues-auto-manager.yml
vendored
22
.github/workflows/issues-auto-manager.yml
vendored
@ -1,8 +1,11 @@
|
||||
name: 🎯 Issues Auto Manager
|
||||
name: 🎯 Issues Manager
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited, labeled, unlabeled]
|
||||
# Re also listen to comments, to remove stale labels right away
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
label-on-content:
|
||||
@ -67,6 +70,23 @@ jobs:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
labels: '✖️ Not Reproducible,✖️ Not A Bug'
|
||||
|
||||
remove-stale-label:
|
||||
name: Remove Stale Label on Comment
|
||||
runs-on: ubuntu-latest
|
||||
# Only run this on new comments, to automatically remove the stale label
|
||||
if: github.event_name == 'issue_comment' && github.actor != 'github-actions[bot]'
|
||||
|
||||
steps:
|
||||
- name: Remove Stale Label
|
||||
# 🤖 Issues Helper
|
||||
# https://github.com/marketplace/actions/issues-helper
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
labels: '⚰️ Stale,🕸️ Inactive,🚏 Awaiting User Response,🛑 No Response'
|
||||
|
||||
write-auto-comments:
|
||||
name: Post Issue Comments Based on Labels
|
||||
needs: [label-on-content, label-on-labels]
|
||||
|
30
.github/workflows/job-close-stale.yml
vendored
30
.github/workflows/job-close-stale.yml
vendored
@ -5,20 +5,11 @@ on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Runs every day at midnight UTC
|
||||
# Re also listen to comment created events or new PR pushes, to remove stale labels right away
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
pull_request:
|
||||
types: [synchronize]
|
||||
|
||||
jobs:
|
||||
mark-inactivity:
|
||||
name: Mark Issues/PRs without Activity
|
||||
runs-on: ubuntu-latest
|
||||
# Only run this on the actual scheduled workflow
|
||||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||
|
||||
steps:
|
||||
- name: Mark Issues/PRs without Activity
|
||||
@ -53,8 +44,6 @@ jobs:
|
||||
name: Mark Issues/PRs Awaiting User Response
|
||||
runs-on: ubuntu-latest
|
||||
needs: mark-inactivity
|
||||
# Only run this on the actual scheduled workflow
|
||||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||
|
||||
steps:
|
||||
- name: Mark Issues/PRs Awaiting User Response
|
||||
@ -82,8 +71,6 @@ jobs:
|
||||
name: Mark Issues with Alternative Exists
|
||||
runs-on: ubuntu-latest
|
||||
needs: await-user-response
|
||||
# Only run this on the actual scheduled workflow
|
||||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||
|
||||
steps:
|
||||
- name: Mark Issues with Alternative Exists
|
||||
@ -106,20 +93,3 @@ jobs:
|
||||
stale-issue-label: '🚏 Awaiting User Response'
|
||||
close-issue-label: '🕸️ Inactive'
|
||||
exempt-issue-labels: '📌 Keep Open'
|
||||
|
||||
remove-stale-label:
|
||||
name: Remove Stale Label on Comment
|
||||
runs-on: ubuntu-latest
|
||||
# Only run this on new comments or PR commits, to automatically remove the stale label
|
||||
if: (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request') && github.actor != 'github-actions[bot]'
|
||||
|
||||
steps:
|
||||
- name: Remove Stale Label
|
||||
# 🤖 Issues Helper
|
||||
# https://github.com/marketplace/actions/issues-helper
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
|
||||
labels: '⚰️ Stale,🕸️ Inactive,🚏 Awaiting User Response,🛑 No Response'
|
||||
|
25
.github/workflows/pr-auto-manager.yml
vendored
25
.github/workflows/pr-auto-manager.yml
vendored
@ -1,8 +1,10 @@
|
||||
name: 🎯 Pull Request Auto Manager
|
||||
name: 🎯 Pull Request Manager
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
check-merge-conflicts:
|
||||
@ -78,9 +80,26 @@ jobs:
|
||||
configuration-path: .github/pr-auto-labels-by-files.yml
|
||||
repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
|
||||
remove-stale-label:
|
||||
name: Remove Stale Label on Comment
|
||||
runs-on: ubuntu-latest
|
||||
# Only runs when this is not done by the github actions bot
|
||||
if: github.actor != 'github-actions[bot]'
|
||||
|
||||
steps:
|
||||
- name: Remove Stale Label
|
||||
# 🤖 Issues Helper
|
||||
# https://github.com/marketplace/actions/issues-helper
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
labels: '⚰️ Stale'
|
||||
|
||||
check-merge-blocking-labels:
|
||||
name: Check Merge Blocking Labels
|
||||
needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files]
|
||||
needs: [check-merge-conflicts, label-by-branches]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@ -123,7 +142,7 @@ jobs:
|
||||
|
||||
write-auto-comments:
|
||||
name: Post PR Comments Based on Labels
|
||||
needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files]
|
||||
needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files, remove-stale-label]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
Reference in New Issue
Block a user