diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
index 10734f74e..1ff252a65 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -1,4 +1,5 @@
name: Bug Report π
+type: Bug
description: Report something that's not working the intended way. Support requests for external programs (reverse proxies, 3rd party servers, other peoples' forks) will be refused! Please use English only.
title: '[BUG]
'
labels: ['π Bug']
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
index 088a8acf3..04d02e23a 100644
--- a/.github/ISSUE_TEMPLATE/feature-request.yml
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -1,4 +1,5 @@
name: Feature Request β¨
+type: Feature
description: Suggest an idea for future development of this project. Please use English only.
title: '[FEATURE_REQUEST] '
labels: ['π¦ Feature Request']
@@ -32,7 +33,7 @@ body:
id: solution
attributes:
label: Describe the solution you'd like
- placeholder: An outline of how you would like this to be implemented, include as much details as possible
+ placeholder: An outline of how you would like this to be implemented, include as much details as possible
validations:
required: true
diff --git a/.github/close-label.yml b/.github/close-label.yml
deleted file mode 100644
index 5f2bfa5ee..000000000
--- a/.github/close-label.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-π Bug: β
Fixed
-π¦ Feature Request: β
Implemented
\ No newline at end of file
diff --git a/.github/issue-auto-comments.yml b/.github/issue-auto-comments.yml
deleted file mode 100644
index 8947d4e1a..000000000
--- a/.github/issue-auto-comments.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-comment:
- footer: |
- ---
- > I am a bot, and this is an automated message π€
-labels:
- - name: βοΈ Invalid
- labeled:
- issue:
- action: close
- body: >
- Hello @{{ issue.user.login }} your ticket has been marked as invalid.
- Please ensure you follow the issue template, provide all requested info,
- and be sure to check the docs + previous issues prior to raising tickets.
- pr:
- body: Thank you @{{ pull_request.user.login }} for suggesting this. Please follow the pull request templates.
- action: close
-
- - name: π©βπ» Good First Issue
- labeled:
- issue:
- body: >
- This issue has been marked as a good first issue for first-time contributors to implement!
- This is a great way to support the project, while also improving your skills, you'll also be credited as a contributor once your PR is merged.
- If you're new to SillyTavern [here are a collection of resources](https://docs.sillytavern.app/)
- If you need any support at all, feel free to reach out via [Discord](https://discord.gg/sillytavern).
-
- - name: β wontfix
- labeled:
- issue:
- action: close
- body: >
- This ticked has been marked as 'wontfix', which usually means it is out-of-scope, or not feasible at this time.
- You can still fork the project and make the changes yourself.
-
- - name: β
Fixed
- labeled:
- issue:
- body: >
- Hello @{{ issue.user.login }}! It looks like all or part of this issue has now been implemented.
-
-
- - name: βΌοΈ High Priority
- labeled:
- issue:
- body: >
- This ticket has been marked as high priority, and has been bumped to the top of the priority list.
- You should expect an implementation to be pushed out soon. Thank you for your patience.
-
- - name: π Spam
- labeled:
- issue:
- action: close
- locking: lock
- lock_reason: spam
- body: >
- This issue has been identified as spam, and is now locked.
- Users who repeatedly raise spam issues may be blocked or reported.
-
- - name: β Don't Merge
- labeled:
- pr:
- body: This PR has been temporarily blocked from merging.
\ No newline at end of file
diff --git a/.github/issues-auto-comments.yml b/.github/issues-auto-comments.yml
new file mode 100644
index 000000000..9c412ffd8
--- /dev/null
+++ b/.github/issues-auto-comments.yml
@@ -0,0 +1,69 @@
+labels:
+ - name: βοΈ Invalid
+ labeled:
+ issue:
+ action: close
+ body: >
+ Hey @{{ issue.user.login }}, this issue has been marked as invalid.
+
+ Please double-check that you've followed the issue template, included all necessary details, and reviewed the docs & previous issues before submitting.
+ If provided, follow the instructions given by maintainers.
+
+ - name: π©βπ» Good First Issue
+ labeled:
+ issue:
+ body: >
+ π This issue has been marked as a good first issue for contributors to implement!
+ This is a great way to support the project. While also improving your skills, you'll also be credited as a contributor once your PR is merged.
+
+ If you're new to SillyTavern [here is the official documentation](https://docs.sillytavern.app/). The official contribution guide can be found [here](https://github.com/SillyTavern/SillyTavern/blob/release/CONTRIBUTING.md).
+ If you need any support, feel free to reach out via [Discord](https://discord.gg/sillytavern), or let us know in this issue or via [discussions](https://github.com/SillyTavern/SillyTavern/discussions).
+
+ - name: β wontfix
+ labeled:
+ issue:
+ action: close
+ body: >
+ β This issue has been marked as 'wontfix', which usually means it is out-of-scope, not feasible at this time or will not be implemented for various reasons.
+ If you have any questions about this, feel free to reach out.
+
+ - name: π Out of Scope
+ labeled:
+ issue:
+ action: close
+ body: >
+ π This issue has been marked as 'out of scope', as this can't or won't be implemented.
+ If you have any questions about this, feel free to reach out.
+
+ - name: β
Done (staging)
+ labeled:
+ issue:
+ body: >
+ β
It looks like all or part of this issue has now been implemented as part of the `staging` branch.
+ If you currently are on the `release` branch, you can switch to `staging` to test this right away.
+
+ Note that `staging` is considered less stable than the official releases. To switch, follow existing instructions,
+ or simply enter the following command: `git switch staging`
+
+ - name: β
Done
+ labeled:
+ issue:
+ body: >
+ β
It looks like all or part of this issue has now been implemented as part of the latest release.
+
+ - name: βΌοΈ High Priority
+ labeled:
+ issue:
+ body: >
+ π¨ This issue has been marked high priority, meaning it's important to the maintainers or community.
+ While we can't promise immediate changes, it is on our radar and will be addressed whenever possible. Thanks for your patience!
+
+ - name: π Spam
+ labeled:
+ issue:
+ action: close
+ locking: lock
+ lock_reason: spam
+ body: >
+ π This issue has been flagged as spam and is now locked.
+ Please avoid posting spam - it disrupts the community and wastes everyone's time.
diff --git a/.github/labeler.yml b/.github/issues-auto-labels.yml
similarity index 52%
rename from .github/labeler.yml
rename to .github/issues-auto-labels.yml
index 850096c9e..8bfb62009 100644
--- a/.github/labeler.yml
+++ b/.github/issues-auto-labels.yml
@@ -1,7 +1,3 @@
-# Add/remove 'critical' label if issue contains the words 'urgent' or 'critical'
-#critical:
-# - '(critical|urgent)'
-
πͺ Windows:
- '(πͺ Windows)'
@@ -15,4 +11,10 @@
- '(π± Termux)'
π§ Linux:
- - '(π§ Linux)'
\ No newline at end of file
+ - '(π§ Linux)'
+
+π¦ Firefox:
+ - '(firefox|mozilla)'
+
+π± Mobile:
+ - '(iphone|ios|android|π± Termux)'
diff --git a/.github/pr-auto-comments.yml b/.github/pr-auto-comments.yml
new file mode 100644
index 000000000..bdb3e8022
--- /dev/null
+++ b/.github/pr-auto-comments.yml
@@ -0,0 +1,51 @@
+labels:
+ - name: βοΈ Invalid
+ labeled:
+ pr:
+ action: close
+ body: >
+ Hey @{{ pull_request.user.login }}, thanks for your contribution!
+ Unfortunately, this PR has been marked as invalid.
+
+ Please check that you've followed the PR template, included all relevant details, and are targeting the correct branch (`staging` for regular contributions, `release` only for hotfixes).
+
+ If you need help, feel free to ask!
+
+ - name: β Don't Merge
+ labeled:
+ pr:
+ body: >
+ π¨ This PR has been temporarily blocked from merging.
+
+ - name: π₯π£ Breaking Changes
+ labeled:
+ pr:
+ body: >
+ β οΈ Heads up! This PR introduces breaking changes.
+
+ Make sure these changes are well-documented and that users will be properly informed when this is released.
+
+ - name: β Waiting For External/Upstream
+ labeled:
+ pr:
+ body: >
+ β This PR is awaiting external or upstream changes or approval.
+ It can only be merged once those changes have been implemented and approved.
+
+ Please inform us of any progress on the upstream changes or approval.
+
+ - name: π¬ Needs Testing
+ labeled:
+ pr:
+ body: >
+ π¬ This PR needs testing!
+ Any contributor can test and leave reviews, so feel free to help us out!
+
+ - name: π₯ ⬀⬀⬀⬀⬀
+ labeled:
+ pr:
+ body: >
+ β οΈ This PR is over 1000 lines, which is larger than recommended.
+
+ Please make sure that it only addresses a single issue - PRs this large are hard to test and may be rejected.
+
diff --git a/.github/pr-auto-labels-by-branch.yml b/.github/pr-auto-labels-by-branch.yml
new file mode 100644
index 000000000..bbb91d760
--- /dev/null
+++ b/.github/pr-auto-labels-by-branch.yml
@@ -0,0 +1,77 @@
+####################################
+# Label PRs against 'release' #
+####################################
+β Against Release Branch:
+- base-branch: 'release'
+
+####################################
+# Labels based on PR branch name #
+####################################
+π¦ Bug Fix:
+- head-branch: ['^fix[/-]', '\bfixes\b']
+
+π Hot Fix:
+- head-branch: ['^hotfix[/-]']
+
+β¨ New Feature:
+- head-branch: ['^feat(ure)?[/-].*?\badd', '^add-']
+
+β¨ Feature Changes:
+- head-branch: ['^feat(ure)?[/-](?!.*\badd\b)', '\bchanges?\b']
+
+π€ API / Model:
+- head-branch: ['\bapi\b', '\bmodels?\b']
+
+π Backend Changes:
+- head-branch: ['\bbackend\b', '\bendpoints?\b']
+
+π Docker:
+- head-branch: ['\bdocker\b']
+
+β Extension:
+- head-branch: ['\bextension\b', '\bext\b']
+
+π¦ Firefox:
+- head-branch: ['\bfirefox\b']
+
+πΌοΈ Image Gen:
+- head-branch: ['\bimage-gen\b']
+
+π Language:
+- head-branch: ['\btranslations?\b', '\blanguages?\b']
+
+π§ Linux:
+- head-branch: ['\blinux\b']
+
+π§© Macros:
+- head-branch: ['\bmacros?\b']
+
+π± Mobile:
+- head-branch: ['\bmobile\b', '\bios\b', '\bandroid\b']
+
+π Performance:
+- head-branch: ['\bperformance\b']
+
+βοΈ Preset:
+- head-branch: ['\bpresets?\b']
+
+π Prompt:
+- head-branch: ['\bprompt\b']
+
+π Refactor:
+- head-branch: ['\brefactor(s|ed)?\b']
+
+π STscript:
+- head-branch: ['\bstscript\b', '\bslash-commands\b']
+
+π·οΈ Tags / Folders:
+- head-branch: ['\btags\b']
+
+ποΈ TTS / Voice:
+- head-branch: ['\btts\b', '\bvoice\b']
+
+π UX:
+- head-branch: ['\bux\b']
+
+πΊοΈ World Info:
+- head-branch: ['\bworld-info\b', '\bwi\b']
diff --git a/.github/pr-auto-labels-by-files.yml b/.github/pr-auto-labels-by-files.yml
new file mode 100644
index 000000000..55946ad2b
--- /dev/null
+++ b/.github/pr-auto-labels-by-files.yml
@@ -0,0 +1,46 @@
+####################################
+# Labels based on changed files #
+####################################
+π Backend Changes:
+- changed-files:
+ - any-glob-to-any-file:
+ - "src/**"
+ - "default/config.yaml"
+ - "server.js"
+ - "plugins.js"
+ - "recover.js"
+ - "webpack.config.js"
+ - "Start.bat"
+ - "start.sh"
+ - "UpdateAndStart.bat"
+ - "UpdateForkAndStart.bat"
+
+βοΈ config.yaml:
+- changed-files:
+ - any-glob-to-any-file:
+ - "default/config.yaml"
+
+π οΈ Build Changes:
+- changed-files:
+ - any-glob-to-any-file:
+ - ".github/workflows/**"
+ - "docker/**"
+ - ".dockerignore"
+ - "Dockerfile"
+ - "webpack.config.js"
+
+π Language:
+- changed-files:
+ - any-glob-to-any-file:
+ - "public/locales/**"
+
+π₯ Dependencies:
+- changed-files:
+ - any-glob-to-any-file:
+ - "public/lib/**" # Every frontend lib counts as a dependency as well
+ - "package.json"
+ - "package-lock.json"
+ - "tests/package.json"
+ - "tests/package-lock.json"
+ - "src/electron/package.json"
+ - "src/electron/package-lock.json"
diff --git a/.github/workflows/add-comment-from-tag.yml b/.github/workflows/add-comment-from-tag.yml
deleted file mode 100644
index 548f83eac..000000000
--- a/.github/workflows/add-comment-from-tag.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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 }}
\ No newline at end of file
diff --git a/.github/workflows/check-merge-conflicts.yml b/.github/workflows/check-merge-conflicts.yml
deleted file mode 100644
index 720723558..000000000
--- a/.github/workflows/check-merge-conflicts.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# Detect and label pull requests that have merge conflicts
-name: ποΈ Check Merge Conflicts
-on:
- push:
- branches:
- - staging
-jobs:
- check-conflicts:
- if: github.repository == 'SillyTavern/SillyTavern'
- 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
\ No newline at end of file
diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml
deleted file mode 100644
index 1d4382592..000000000
--- a/.github/workflows/close-stale-issues.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# 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: 183
- days-before-close: 7
- operations-per-run: 30
- remove-stale-when-updated: true
- enable-statistics: true
- stale-issue-message: >
- This issue has gone 6 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 7 days.
- stale-pr-message: >
- This PR is stale because it has been open 6 months with no activity. Either remove the stale label or comment below with a short update,
- otherwise this PR will be closed in 7 days.
- close-issue-message: >
- This issue was automatically closed because it has been stalled for over 6 months with no activity.
- close-pr-message: >
- This pull request was automatically closed because it has been stalled for over 6 months 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: 7
- days-before-close: 7
- 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: 183
- 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'
diff --git a/.github/workflows/get-pr-size.yml b/.github/workflows/get-pr-size.yml
deleted file mode 100644
index ac5f9d4d3..000000000
--- a/.github/workflows/get-pr-size.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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.
\ No newline at end of file
diff --git a/.github/workflows/issues-auto-manager.yml b/.github/workflows/issues-auto-manager.yml
new file mode 100644
index 000000000..e35f71b66
--- /dev/null
+++ b/.github/workflows/issues-auto-manager.yml
@@ -0,0 +1,107 @@
+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:
+ name: Auto-Label Issues (Based on Issue Content)
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Auto-Label Issues (Based on Issue Content)
+ # only auto label based on issue content once, on open (to prevent re-labeling removed labels)
+ if: github.event.action == 'opened'
+
+ # Issue Labeler
+ # https://github.com/marketplace/actions/regex-issue-labeler
+ uses: github/issue-labeler@v3
+ with:
+ configuration-path: .github/issues-auto-labels.yml
+ enable-versioned-regex: 0
+ repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+
+ label-on-labels:
+ name: Auto-Label Issues (Based on Issue Labels)
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: β
Add "π Approved" for relevant labels
+ if: contains(fromJSON('["π©βπ» Good First Issue", "π Help Wanted", "πͺ² Confirmed", "β οΈ High Priority", "β Medium Priority", "π€ Low Priority"]'), github.event.label.name)
+ # π€ Issues Helper
+ # https://github.com/marketplace/actions/issues-helper
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: 'add-labels'
+ token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ labels: 'π Approved'
+
+ - name: β Remove progress labels when issue is marked done or stale
+ if: contains(fromJSON('["β
Done", "β
Done (staging)", "β°οΈ Stale", "β wontfix"]'), github.event.label.name)
+ # π€ 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 }}
+ labels: 'π§βπ» In Progress,π€ Unsure,π€ Under Consideration'
+
+ - name: β Remove temporary labels when confirmed labels are added
+ if: contains(fromJSON('["β wontfix","π Approved","π©βπ» Good First Issue"]'), github.event.label.name)
+ # π€ 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 }}
+ labels: 'π€ Unsure,π€ Under Consideration'
+
+ - name: β Remove no bug labels when "πͺ² Confirmed" is added
+ if: github.event.label.name == 'πͺ² Confirmed'
+ # π€ 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 }}
+ 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]
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Repository
+ # Checkout
+ # https://github.com/marketplace/actions/checkout
+ uses: actions/checkout@v4
+
+ - name: Post Issue Comments Based on Labels
+ # Label Commenter
+ # https://github.com/marketplace/actions/label-commenter
+ uses: peaceiris/actions-label-commenter@v1
+ with:
+ config_file: .github/issues-auto-comments.yml
+ github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/issues-updates-on-merge.yml b/.github/workflows/issues-updates-on-merge.yml
new file mode 100644
index 000000000..a0f091c34
--- /dev/null
+++ b/.github/workflows/issues-updates-on-merge.yml
@@ -0,0 +1,39 @@
+name: π― Update Issues on Push
+
+on:
+ push:
+ branches:
+ - staging
+ - release
+
+jobs:
+ # This runs commits to staging/release, reading the commit messages. Check `pr-auto-manager.yml`:`update-linked-issues` for PR-linked updates.
+ update-linked-issues:
+ name: Update Issues on Push
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout Repository
+ # Checkout
+ # https://github.com/marketplace/actions/checkout
+ uses: actions/checkout@v4
+
+ - name: Extract Linked Issues from Commit Message
+ id: extract_issues
+ run: |
+ ISSUES=$(git log -1 --pretty=%B | grep -oiE '(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) #([0-9]+)' | awk '{print $2}' | tr -d '#' | jq -R -s -c 'split("\n")[:-1]')
+ echo "issues=$ISSUES" >> $GITHUB_ENV
+
+ - name: Label Linked Issues
+ id: label_linked_issues
+ env:
+ GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ run: |
+ for ISSUE in $(echo $issues | jq -r '.[]'); do
+ echo "Updating issue #$ISSUE"
+ if [ "${{ github.ref }}" == "refs/heads/staging" ]; then
+ gh issue edit $ISSUE -R ${{ github.repository }} --add-label "β
Done (staging)"
+ elif [ "${{ github.ref }}" == "refs/heads/release" ]; then
+ gh issue edit $ISSUE -R ${{ github.repository }} --add-label "β
Done"
+ fi
+ done
diff --git a/.github/workflows/job-close-stale.yml b/.github/workflows/job-close-stale.yml
new file mode 100644
index 000000000..1d9a7de58
--- /dev/null
+++ b/.github/workflows/job-close-stale.yml
@@ -0,0 +1,95 @@
+name: π― Close Stale Issues/PRs Workflow
+
+on:
+ # Run the workflow every day
+ workflow_dispatch:
+ schedule:
+ - cron: '0 0 * * *' # Runs every day at midnight UTC
+
+jobs:
+ mark-inactivity:
+ name: Mark Issues/PRs without Activity
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Mark Issues/PRs without Activity
+ # Close Stale Issues and PRs
+ # https://github.com/marketplace/actions/close-stale-issues
+ uses: actions/stale@v9
+ with:
+ repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ days-before-stale: 183
+ days-before-close: 7
+ operations-per-run: 30
+ remove-stale-when-updated: true
+ enable-statistics: true
+ stale-issue-message: >
+ β³ This issue has been inactive for 6 months. If it's still relevant, drop a comment below to keep it open.
+ Otherwise, it will be auto-closed in 7 days.
+ stale-pr-message: >
+ β³ This PR has been inactive for 6 months. If it's still relevant, update it or remove the stale label.
+ Otherwise, it will be auto-closed in 7 days.
+ close-issue-message: >
+ π This issue was auto-closed due to inactivity for over 6 months.
+ close-pr-message: >
+ π This PR was auto-closed due to inactivity for over 6 months.
+ 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'
+
+ await-user-response:
+ name: Mark Issues/PRs Awaiting User Response
+ runs-on: ubuntu-latest
+ needs: mark-inactivity
+
+ steps:
+ - name: Mark Issues/PRs Awaiting User Response
+ # Close Stale Issues and PRs
+ # https://github.com/marketplace/actions/close-stale-issues
+ uses: actions/stale@v9
+ with:
+ repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ days-before-stale: 7
+ days-before-close: 7
+ operations-per-run: 30
+ remove-stale-when-updated: true
+ stale-issue-message: >
+ β οΈ Hey! We need some more info to move forward with this issue.
+ Please provide the requested details in the next few days to keep this ticket open.
+ close-issue-message: >
+ π This issue was auto-closed due to no response from user.
+ only-labels: 'π Awaiting User Response'
+ labels-to-remove-when-unstale: 'π Awaiting User Response'
+ stale-issue-label: 'π No Response'
+ close-issue-label: 'πΈοΈ Inactive'
+ exempt-issue-labels: 'π§ Alternative Exists'
+
+ alternative-exists:
+ name: Mark Issues with Alternative Exists
+ runs-on: ubuntu-latest
+ needs: await-user-response
+
+ steps:
+ - name: Mark Issues with Alternative Exists
+ # Close Stale Issues and PRs
+ # https://github.com/marketplace/actions/close-stale-issues
+ uses: actions/stale@v9
+ with:
+ repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ days-before-stale: 7
+ days-before-close: 7
+ operations-per-run: 30
+ remove-stale-when-updated: true
+ stale-issue-message: >
+ π An alternative solution has been provided for this issue.
+ Did this solve your problem? If so, we'll go ahead and close it.
+ If you still need help, drop a comment within the next 7 days to keep this open.
+ close-issue-message: >
+ β
Closing this issue due to no confirmation on the alternative solution.
+ only-labels: 'π§ Alternative Exists'
+ stale-issue-label: 'π Awaiting User Response'
+ close-issue-label: 'πΈοΈ Inactive'
+ exempt-issue-labels: 'π Keep Open'
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
deleted file mode 100644
index 554c588b8..000000000
--- a/.github/workflows/labeler.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: "Issue Labeler"
-on:
- issues:
- types: [opened, edited]
-
-permissions:
- issues: write
- contents: read
-
-jobs:
- triage:
- runs-on: ubuntu-latest
- steps:
- - uses: github/issue-labeler@v3.4
- with:
- configuration-path: .github/labeler.yml
-# not-before: 2020-01-15T02:54:32Z # optional and will result in any issues prior to this timestamp to be ignored.
- enable-versioned-regex: 0
- repo-token: ${{ github.token }}
\ No newline at end of file
diff --git a/.github/workflows/manage-pending-labels-closed.yml b/.github/workflows/manage-pending-labels-closed.yml
deleted file mode 100644
index 892f2f8f9..000000000
--- a/.github/workflows/manage-pending-labels-closed.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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'
\ No newline at end of file
diff --git a/.github/workflows/manage-pending-labels.yml b/.github/workflows/manage-pending-labels.yml
deleted file mode 100644
index 44d91b523..000000000
--- a/.github/workflows/manage-pending-labels.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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'
\ No newline at end of file
diff --git a/.github/workflows/on-close-handler.yml b/.github/workflows/on-close-handler.yml
new file mode 100644
index 000000000..39da98688
--- /dev/null
+++ b/.github/workflows/on-close-handler.yml
@@ -0,0 +1,23 @@
+name: π― Issues/PRs On Close Handler
+
+on:
+ issues:
+ types: [closed]
+ pull_request_target:
+ types: [closed]
+
+jobs:
+ remove-labels:
+ name: Remove Pending Labels on Close
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Remove Pending Labels on Close
+ # π€ 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: 'π Awaiting User Response,π§βπ» In Progress,π Keep Open,π« Merge Conflicts,π¬ Needs Testing,π¨ Needs Work,β°οΈ Stale,β Waiting For External/Upstream'
diff --git a/.github/workflows/on-open-handler.yml b/.github/workflows/on-open-handler.yml
new file mode 100644
index 000000000..07e781475
--- /dev/null
+++ b/.github/workflows/on-open-handler.yml
@@ -0,0 +1,50 @@
+name: π― Issues/PRs Open Handler
+
+on:
+ issues:
+ types: [opened]
+ pull_request_target:
+ types: [opened]
+
+jobs:
+ label-maintainer:
+ name: Label if Author is a Repo Maintainer
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Label if Author is a Repo Maintainer
+ # GitHub Script
+ # https://github.com/marketplace/actions/github-script
+ uses: actions/github-script@v7
+ with:
+ script: |
+ // Get basic info
+ const { owner, repo } = context.repo;
+ const payload = context.payload;
+ // Determine if it's an issue or a pull request
+ const eventData = payload.issue || payload.pull_request;
+ const username = eventData.user.login;
+ const issue_number = eventData.number;
+
+ // Get the collaborator permission level for the user
+ const { data: permissionData } = await github.repos.getCollaboratorPermissionLevel({
+ owner,
+ repo,
+ username,
+ });
+
+ const permission = permissionData.permission;
+ console.log(`User ${username} has permission level: ${permission}`);
+
+ // Check if user is an admin or has maintain permissions
+ if (['admin', 'maintain'].includes(permission)) {
+ console.log(`Adding "Maintainer" label to issue/PR #${issue_number}`);
+ await github.issues.addLabels({
+ owner,
+ repo,
+ issue_number,
+ labels: ['π· Maintainer'],
+ });
+ } else {
+ console.log(`User ${username} is not a repo maintainer.`);
+ }
diff --git a/.github/workflows/pr-auto-manager.yml b/.github/workflows/pr-auto-manager.yml
new file mode 100644
index 000000000..35cfabd8c
--- /dev/null
+++ b/.github/workflows/pr-auto-manager.yml
@@ -0,0 +1,182 @@
+name: π― Pull Request Manager
+
+on:
+ pull_request_target:
+ types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed]
+ pull_request_review_comment:
+ types: [created]
+
+jobs:
+ label-by-size:
+ name: Apply Label for PR Size
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Label PR Size
+ # Pull Request Size Labeler
+ # https://github.com/marketplace/actions/pull-request-size-labeler
+ uses: codelytv/pr-size-labeler@v1
+ with:
+ GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ xs_label: 'π© ⬀ββββ'
+ xs_max_size: '20'
+ s_label: 'π© ⬀⬀βββ'
+ s_max_size: '100'
+ m_label: 'π¨ ⬀⬀⬀ββ'
+ m_max_size: '500'
+ l_label: 'π§ ⬀⬀⬀⬀β'
+ l_max_size: '1000'
+ xl_label: 'π₯ ⬀⬀⬀⬀⬀'
+ fail_if_xl: 'false'
+ github_api_url: 'https://api.github.com'
+ files_to_ignore: |
+ "package-lock.json"
+ "public/lib/*"
+
+ label-by-branches:
+ name: Apply Labels Based on Branch Name and Target Branch
+ runs-on: ubuntu-latest
+ # Only label once when PR is created or branches are changed, to allow manual label removal
+ if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head))
+
+ steps:
+ - name: Apply Labels Based on Branch Name and Target Branch
+ # Pull Request Labeler
+ # https://github.com/marketplace/actions/labeler
+ uses: actions/labeler@v5
+ with:
+ configuration-path: .github/pr-auto-labels-by-branch.yml
+ repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+
+ label-by-files:
+ name: Apply Labels Based on Changed Files
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Apply Labels Based on Changed Files
+ # Pull Request Labeler
+ # https://github.com/marketplace/actions/labeler
+ uses: actions/labeler@v5
+ with:
+ 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: [label-by-branches, label-by-files]
+ runs-on: ubuntu-latest
+ # Run, even if the previous jobs were skipped/failed
+ if: always()
+
+ steps:
+ - name: Check Merge Blocking
+ # GitHub Script
+ # https://github.com/marketplace/actions/github-scriptLabels
+ id: label-check
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const prLabels = context.payload.pull_request.labels.map(label => label.name);
+ const blockingLabels = [
+ "β Don't Merge",
+ "π¨ Needs Work",
+ "π¬ Needs Testing",
+ "β Waiting For External/Upstream",
+ "β Against Release Branch",
+ "π₯π£ Breaking Changes"
+ ];
+ const hasBlockingLabel = prLabels.some(label => blockingLabels.includes(label));
+
+ if (hasBlockingLabel) {
+ console.log("Blocking label detected. Setting warning status.");
+ await github.rest.checks.create({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ name: "PR Label Warning",
+ head_sha: context.payload.pull_request.head.sha,
+ status: "completed",
+ conclusion: "neutral",
+ output: {
+ title: "Potential Merge Issue",
+ summary: "This PR has a merge-blocking label. Proceed with caution."
+ }
+ });
+ } else {
+ console.log("No merge-blocking labels found.");
+ }
+
+ write-auto-comments:
+ name: Post PR Comments Based on Labels
+ needs: [label-by-size, label-by-branches, label-by-files]
+ runs-on: ubuntu-latest
+ # Run, even if the previous jobs were skipped/failed
+ if: always()
+
+ steps:
+ - name: Checkout Repository
+ # Checkout
+ # https://github.com/marketplace/actions/checkout
+ uses: actions/checkout@v4
+
+ - name: Post PR Comments Based on Labels
+ # Label Commenter for PRs
+ # https://github.com/marketplace/actions/label-commenter
+ uses: peaceiris/actions-label-commenter@v1
+ with:
+ config_file: .github/pr-auto-comments.yml
+ github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+
+ # This runs on merged PRs to staging, reading the PR body and directly linked issues. Check `issues-updates-on-merge.yml`:`update-linked-issues` for commit-based updates.
+ update-linked-issues:
+ name: Update Issues on Staging Merge
+ runs-on: ubuntu-latest
+ if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'staging'
+
+ steps:
+ - name: Extract Linked Issues From PR Description
+ id: extract_issues
+ run: |
+ ISSUES=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH" | grep -oiE '(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) #([0-9]+)' | awk '{print $2}' | tr -d '#' | jq -R -s -c 'split("\n")[:-1]')
+ echo "issues=$ISSUES" >> $GITHUB_ENV
+
+ - name: Fetch Directly Linked Issues
+ id: fetch_linked_issues
+ run: |
+ PR_NUMBER=${{ github.event.pull_request.number }}
+ REPO=${{ github.repository }}
+ API_URL="https://api.github.com/repos/$REPO/pulls/$PR_NUMBER/issues"
+ ISSUES=$(curl -s -H "Authorization: token ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}" "$API_URL" | jq -r '.[].number' | jq -R -s -c 'split("\n")[:-1]')
+ echo "linked_issues=$ISSUES" >> $GITHUB_ENV
+
+ - name: Merge Issue Lists
+ id: merge_issues
+ run: |
+ ISSUES=$(jq -c -n --argjson a "$issues" --argjson b "$linked_issues" '$a + $b | unique')
+ echo "final_issues=$ISSUES" >> $GITHUB_ENV
+
+ - name: Label Linked Issues
+ id: label_linked_issues
+ env:
+ GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ run: |
+ for ISSUE in $(echo $final_issues | jq -r '.[]'); do
+ echo "Updating issue #$ISSUE"
+ gh issue edit $ISSUE -R ${{ github.repository }} --add-label "β
Done (staging)"
+ done
diff --git a/.github/workflows/pr-check-merge-conflicts.yaml b/.github/workflows/pr-check-merge-conflicts.yaml
new file mode 100644
index 000000000..553ef40c9
--- /dev/null
+++ b/.github/workflows/pr-check-merge-conflicts.yaml
@@ -0,0 +1,24 @@
+name: π― Push Handler
+
+on:
+ # So that PRs touching the same files as the push are updated
+ push:
+ # So that the `dirtyLabel` is removed if conflicts are resolved
+ pull_request_target:
+ types: [synchronize]
+
+jobs:
+ check-merge-conflicts:
+ name: Check Merge Conflicts
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Check Merge Conflicts
+ # Label Conflicting Pull Requests
+ # https://github.com/marketplace/actions/label-conflicting-pull-requests
+ uses: eps1lon/actions-label-merge-conflict@v3
+ with:
+ dirtyLabel: 'π« Merge Conflicts'
+ repoToken: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
+ commentOnDirty: >
+ β οΈ This PR has conflicts that need to be resolved before it can be merged.