Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74c158b

Browse files
authored
Merge pull request #4656 from SillyTavern/staging
Staging
2 parents 8f7b6b4 + 9111236 commit 74c158b

103 files changed

Lines changed: 4364 additions & 1528 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.github/pr-auto-comments.ymlβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ labels:
4141
πŸ”¬ This PR needs testing!
4242
Any contributor can test and leave reviews, so feel free to help us out!
4343
44+
- name: ❗ Against Release Branch
45+
labeled:
46+
pr:
47+
body: >
48+
❗ This PR is against the `release` branch.
49+
50+
Please make sure this was intended, and you did not want to target the `staging` branch. Only hotfixes, readme changes and similar should be made against `release`.
51+
52+
You can change the target branch **without recreating the PR** by clicking "Edit" at the top of the page.
53+
4454
- name: πŸŸ₯ ⬀⬀⬀⬀⬀
4555
labeled:
4656
pr:

β€Ž.github/pull_request_template.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Checklist:
44

5-
- [ ] I have read the [Contributing guidelines](https://github.com/SillyTavern/SillyTavern/blob/release/CONTRIBUTING.md).
5+
- [ ] I have read the [Contribution guidelines](https://github.com/SillyTavern/SillyTavern/blob/release/CONTRIBUTING.md).

β€Ž.github/workflows/issues-auto-manager.ymlβ€Ž

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@ jobs:
1515
label-on-content:
1616
name: 🏷️ Label Issues by Content
1717
runs-on: ubuntu-latest
18+
if: always()
1819

1920
steps:
21+
- name: Mint App Token
22+
id: app
23+
# Create a GitHub App token
24+
# https://github.com/marketplace/actions/create-github-app-token
25+
uses: actions/create-github-app-token@v2
26+
with:
27+
app-id: ${{ vars.ST_BOT_APP_ID }}
28+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+
owner: ${{ github.repository_owner }}
30+
2031
- name: Checkout Repository
2132
# Checkout
2233
# https://github.com/marketplace/actions/checkout
@@ -32,21 +43,33 @@ jobs:
3243
with:
3344
configuration-path: .github/issues-auto-labels.yml
3445
enable-versioned-regex: 0
35-
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
repo-token: ${{ steps.app.outputs.token }}
3647

3748
label-on-labels:
3849
name: 🏷️ Label Issues by Labels
50+
needs: [label-on-content]
3951
runs-on: ubuntu-latest
52+
if: always()
4053

4154
steps:
55+
- name: Mint App Token
56+
id: app
57+
# Create a GitHub App token
58+
# https://github.com/marketplace/actions/create-github-app-token
59+
uses: actions/create-github-app-token@v2
60+
with:
61+
app-id: ${{ vars.ST_BOT_APP_ID }}
62+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
63+
owner: ${{ github.repository_owner }}
64+
4265
- name: βœ… Add "πŸ‘ Approved" for relevant labels
4366
if: contains(fromJSON('["πŸ‘©β€πŸ’» Good First Issue", "πŸ™ Help Wanted", "πŸͺ² Confirmed", "⚠️ High Priority", "❕ Medium Priority", "πŸ’€ Low Priority"]'), github.event.label.name)
4467
# πŸ€– Issues Helper
4568
# https://github.com/marketplace/actions/issues-helper
4669
uses: actions-cool/[email protected]
4770
with:
4871
actions: 'add-labels'
49-
token: ${{ secrets.GITHUB_TOKEN }}
72+
token: ${{ steps.app.outputs.token }}
5073
labels: 'πŸ‘ Approved'
5174

5275
- name: ❌ Remove progress labels when issue is marked done or stale
@@ -56,7 +79,7 @@ jobs:
5679
uses: actions-cool/[email protected]
5780
with:
5881
actions: 'remove-labels'
59-
token: ${{ secrets.GITHUB_TOKEN }}
82+
token: ${{ steps.app.outputs.token }}
6083
labels: 'πŸ§‘β€πŸ’» In Progress,πŸ€” Unsure,πŸ€” Under Consideration'
6184

6285
- name: ❌ Remove temporary labels when confirmed labels are added
@@ -66,7 +89,7 @@ jobs:
6689
uses: actions-cool/[email protected]
6790
with:
6891
actions: 'remove-labels'
69-
token: ${{ secrets.GITHUB_TOKEN }}
92+
token: ${{ steps.app.outputs.token }}
7093
labels: 'πŸ€” Unsure,πŸ€” Under Consideration'
7194

7295
- name: ❌ Remove no bug labels when "πŸͺ² Confirmed" is added
@@ -76,32 +99,54 @@ jobs:
7699
uses: actions-cool/[email protected]
77100
with:
78101
actions: 'remove-labels'
79-
token: ${{ secrets.GITHUB_TOKEN }}
102+
token: ${{ steps.app.outputs.token }}
80103
labels: 'βœ–οΈ Not Reproducible,βœ–οΈ Not A Bug'
81104

82105
remove-stale-label:
83106
name: πŸ—‘οΈ Remove Stale Label on Comment
107+
needs: [label-on-content, label-on-labels]
84108
runs-on: ubuntu-latest
85109
# Only run this on new comments, to automatically remove the stale label
86-
if: github.event_name == 'issue_comment' && github.actor != 'github-actions[bot]'
110+
if: always() && (github.event_name == 'issue_comment' && github.event.sender.type != 'Bot')
87111

88112
steps:
113+
- name: Mint App Token
114+
id: app
115+
# Create a GitHub App token
116+
# https://github.com/marketplace/actions/create-github-app-token
117+
uses: actions/create-github-app-token@v2
118+
with:
119+
app-id: ${{ vars.ST_BOT_APP_ID }}
120+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
121+
owner: ${{ github.repository_owner }}
122+
89123
- name: Remove Stale Label
90124
# πŸ€– Issues Helper
91125
# https://github.com/marketplace/actions/issues-helper
92126
uses: actions-cool/[email protected]
93127
with:
94128
actions: 'remove-labels'
95-
token: ${{ secrets.GITHUB_TOKEN }}
129+
token: ${{ steps.app.outputs.token }}
96130
issue-number: ${{ github.event.issue.number }}
97131
labels: '⚰️ Stale,πŸ•ΈοΈ Inactive,🚏 Awaiting User Response,πŸ›‘ No Response'
98132

99133
write-auto-comments:
100134
name: πŸ’¬ Post Issue Comments Based on Labels
101-
needs: [label-on-content, label-on-labels]
135+
needs: [label-on-content, label-on-labels, remove-stale-label]
102136
runs-on: ubuntu-latest
137+
if: always()
103138

104139
steps:
140+
- name: Mint App Token
141+
id: app
142+
# Create a GitHub App token
143+
# https://github.com/marketplace/actions/create-github-app-token
144+
uses: actions/create-github-app-token@v2
145+
with:
146+
app-id: ${{ vars.ST_BOT_APP_ID }}
147+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
148+
owner: ${{ github.repository_owner }}
149+
105150
- name: Checkout Repository
106151
# Checkout
107152
# https://github.com/marketplace/actions/checkout
@@ -113,4 +158,4 @@ jobs:
113158
uses: peaceiris/[email protected]
114159
with:
115160
config_file: .github/issues-auto-comments.yml
116-
github_token: ${{ secrets.GITHUB_TOKEN }}
161+
github_token: ${{ steps.app.outputs.token }}

β€Ž.github/workflows/issues-updates-on-merge.ymlβ€Ž

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@ jobs:
1515
update-linked-issues:
1616
name: πŸ”— Mark Linked Issues Done on Push
1717
runs-on: ubuntu-latest
18+
if: always()
1819

1920
steps:
21+
- name: Mint App Token
22+
id: app
23+
# Create a GitHub App token
24+
# https://github.com/marketplace/actions/create-github-app-token
25+
uses: actions/create-github-app-token@v2
26+
with:
27+
app-id: ${{ vars.ST_BOT_APP_ID }}
28+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+
owner: ${{ github.repository_owner }}
30+
2031
- name: Checkout Repository
2132
# Checkout
2233
# https://github.com/marketplace/actions/checkout
@@ -31,7 +42,7 @@ jobs:
3142
- name: Label Linked Issues
3243
id: label_linked_issues
3344
env:
34-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
GH_TOKEN: ${{ steps.app.outputs.token }}
3546
run: |
3647
for ISSUE in $(echo $issues | jq -r '.[]'); do
3748
if [ "${{ github.ref }}" == "refs/heads/staging" ]; then

β€Ž.github/workflows/job-close-stale.ymlβ€Ž

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,25 @@ jobs:
1515
mark-inactivity:
1616
name: ⏳ Mark Issues/PRs without Activity
1717
runs-on: ubuntu-latest
18+
if: always()
1819

1920
steps:
21+
- name: Mint App Token
22+
id: app
23+
# Create a GitHub App token
24+
# https://github.com/marketplace/actions/create-github-app-token
25+
uses: actions/create-github-app-token@v2
26+
with:
27+
app-id: ${{ vars.ST_BOT_APP_ID }}
28+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+
owner: ${{ github.repository_owner }}
30+
2031
- name: Mark Issues/PRs without Activity
2132
# Close Stale Issues and PRs
2233
# https://github.com/marketplace/actions/close-stale-issues
2334
uses: actions/[email protected]
2435
with:
25-
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
repo-token: ${{ steps.app.outputs.token }}
2637
days-before-stale: 183
2738
days-before-close: 7
2839
operations-per-run: 30
@@ -47,16 +58,27 @@ jobs:
4758

4859
await-user-response:
4960
name: ⚠️ Mark Issues/PRs Awaiting User Response
61+
needs: [mark-inactivity]
5062
runs-on: ubuntu-latest
51-
needs: mark-inactivity
63+
if: always()
5264

5365
steps:
66+
- name: Mint App Token
67+
id: app
68+
# Create a GitHub App token
69+
# https://github.com/marketplace/actions/create-github-app-token
70+
uses: actions/create-github-app-token@v2
71+
with:
72+
app-id: ${{ vars.ST_BOT_APP_ID }}
73+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
74+
owner: ${{ github.repository_owner }}
75+
5476
- name: Mark Issues/PRs Awaiting User Response
5577
# Close Stale Issues and PRs
5678
# https://github.com/marketplace/actions/close-stale-issues
5779
uses: actions/[email protected]
5880
with:
59-
repo-token: ${{ secrets.GITHUB_TOKEN }}
81+
repo-token: ${{ steps.app.outputs.token }}
6082
days-before-stale: 7
6183
days-before-close: 7
6284
operations-per-run: 30
@@ -74,16 +96,27 @@ jobs:
7496

7597
alternative-exists:
7698
name: πŸ”„ Mark Issues with Alternative Exists
99+
needs: [mark-inactivity, await-user-response]
77100
runs-on: ubuntu-latest
78-
needs: await-user-response
101+
if: always()
79102

80103
steps:
104+
- name: Mint App Token
105+
id: app
106+
# Create a GitHub App token
107+
# https://github.com/marketplace/actions/create-github-app-token
108+
uses: actions/create-github-app-token@v2
109+
with:
110+
app-id: ${{ vars.ST_BOT_APP_ID }}
111+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
112+
owner: ${{ github.repository_owner }}
113+
81114
- name: Mark Issues with Alternative Exists
82115
# Close Stale Issues and PRs
83116
# https://github.com/marketplace/actions/close-stale-issues
84117
uses: actions/[email protected]
85118
with:
86-
repo-token: ${{ secrets.GITHUB_TOKEN }}
119+
repo-token: ${{ steps.app.outputs.token }}
87120
days-before-stale: 7
88121
days-before-close: 7
89122
operations-per-run: 30

β€Ž.github/workflows/on-close-handler.ymlβ€Ž

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,25 @@ jobs:
1515
remove-labels:
1616
name: πŸ—‘οΈ Remove Pending Labels on Close
1717
runs-on: ubuntu-latest
18+
if: always()
1819

1920
steps:
21+
- name: Mint App Token
22+
id: app
23+
# Create a GitHub App token
24+
# https://github.com/marketplace/actions/create-github-app-token
25+
uses: actions/create-github-app-token@v2
26+
with:
27+
app-id: ${{ vars.ST_BOT_APP_ID }}
28+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+
owner: ${{ github.repository_owner }}
30+
2031
- name: Remove Pending Labels on Close
2132
# πŸ€– Issues Helper
2233
# https://github.com/marketplace/actions/issues-helper
2334
uses: actions-cool/[email protected]
2435
with:
2536
actions: remove-labels
26-
token: ${{ secrets.GITHUB_TOKEN }}
37+
token: ${{ steps.app.outputs.token }}
2738
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
2839
labels: '🚏 Awaiting User Response,πŸ§‘β€πŸ’» In Progress,πŸ“Œ Keep Open,🚫 Merge Conflicts,πŸ”¬ Needs Testing,πŸ”¨ Needs Work,⚰️ Stale,β›” Waiting For External/Upstream'

β€Ž.github/workflows/on-open-handler.ymlβ€Ž

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,25 @@ jobs:
1515
label-maintainer:
1616
name: 🏷️ Label if Author is a Repo Maintainer
1717
runs-on: ubuntu-latest
18-
if: contains(fromJson('["Cohee1207", "RossAscends", "Wolfsblvt"]'), github.actor)
18+
if: always() && contains(fromJson('["Cohee1207", "RossAscends", "Wolfsblvt"]'), github.actor)
1919

2020
steps:
21+
- name: Mint App Token
22+
id: app
23+
# Create a GitHub App token
24+
# https://github.com/marketplace/actions/create-github-app-token
25+
uses: actions/create-github-app-token@v2
26+
with:
27+
app-id: ${{ vars.ST_BOT_APP_ID }}
28+
private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+
owner: ${{ github.repository_owner }}
30+
2131
- name: Label if Author is a Repo Maintainer
2232
# πŸ€– Issues Helper
2333
# https://github.com/marketplace/actions/issues-helper
2434
uses: actions-cool/[email protected]
2535
with:
2636
actions: 'add-labels'
27-
token: ${{ secrets.GITHUB_TOKEN }}
37+
token: ${{ steps.app.outputs.token }}
2838
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
2939
labels: 'πŸ‘· Maintainer'

0 commit comments

Comments
Β (0)